/* ============================================
   LingoKey Landing Page Styles
   Matching the app's Dark OLED + Light theme
   ============================================ */

/* CSS Variables - matching src/index.css */
:root {
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --background: 6 17 15;
  --foreground: 231 255 248;
  --primary: 14 31 28;
  --on-primary: 244 255 252;
  --secondary: 22 49 43;
  --accent: 13 148 136;
  --muted: 11 26 23;
  --border: 35 73 66;
  --border-strong: 74 116 107;
  --destructive: 239 68 68;
  --ring: 45 212 191;
  --surface: 9 22 19;
  --surface-elevated: 15 34 30;
  --surface-soft: 18 39 35;
  --shadow-strong: 3 10 8;
  --scrollbar: 47 90 82;
  --scrollbar-hover: 76 129 117;

  color-scheme: dark;
}

.light {
  --background: 242 252 248;
  --foreground: 19 78 74;
  --primary: 255 255 255;
  --on-primary: 240 253 250;
  --secondary: 224 242 238;
  --accent: 13 148 136;
  --muted: 233 247 243;
  --border: 185 221 214;
  --border-strong: 124 177 166;
  --destructive: 220 38 38;
  --ring: 20 184 166;
  --surface: 250 255 253;
  --surface-elevated: 255 255 255;
  --surface-soft: 240 252 249;
  --shadow-strong: 15 62 56;
  --scrollbar: 184 216 209;
  --scrollbar-hover: 126 171 162;

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: rgb(var(--background) / 1);
  color: rgb(var(--foreground) / 1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

::selection {
  background: rgb(var(--ring) / 0.28);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgb(var(--scrollbar) / 0.9);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgb(var(--scrollbar-hover) / 1);
}

/* Utilities */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgb(var(--foreground) / 0.5);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0 24px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 200ms ease-out;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: rgb(var(--accent) / 1);
  color: rgb(var(--on-primary) / 1);
  box-shadow: 0 12px 30px -18px rgb(var(--accent) / 0.45);
}
.btn-primary:hover {
  background: rgb(var(--accent) / 0.92);
  box-shadow: 0 18px 38px -18px rgb(var(--accent) / 0.78);
}

.btn-secondary {
  background: rgb(var(--secondary) / 0.82);
  color: rgb(var(--foreground) / 1);
  border-color: rgb(var(--border) / 0.7);
  box-shadow: inset 0 1px 0 rgb(var(--foreground) / 0.04);
}
.btn-secondary:hover {
  background: rgb(var(--secondary) / 1);
  border-color: rgb(var(--border-strong) / 0.7);
}

.btn-lg {
  height: 52px;
  padding: 0 28px;
  font-size: 15px;
  border-radius: 14px;
}

/* KBD */
.kbd-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  border: 1px solid rgb(var(--border) / 0.6);
  background: rgb(var(--primary) / 0.8);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: rgb(var(--foreground) / 0.7);
  box-shadow: inset 0 -1px 0 rgb(var(--background) / 0.12);
}

.kbd-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgb(var(--foreground) / 0.5);
  font-size: 12px;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 100;
  border-radius: 16px;
  border: 1px solid rgb(var(--border) / 0.5);
  background: rgb(var(--surface) / 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 44px -32px rgb(var(--shadow-strong) / 0.55);
  transition: all 200ms ease-out;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgb(var(--foreground) / 1);
}

.nav-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav-brand-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgb(var(--foreground) / 0.65);
  text-decoration: none;
  transition: color 200ms ease-out;
}

.nav-links a:hover {
  color: rgb(var(--foreground) / 1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-toggle,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgb(var(--border) / 0.5);
  background: rgb(var(--primary) / 0.6);
  color: rgb(var(--foreground) / 0.7);
  cursor: pointer;
  transition: all 200ms ease-out;
}

.lang-toggle:hover,
.theme-toggle:hover {
  background: rgb(var(--primary) / 1);
  color: rgb(var(--foreground) / 1);
}

.lang-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

.theme-icon-sun {
  display: none;
}
.light .theme-icon-sun {
  display: block;
}
.light .theme-icon-moon {
  display: none;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: rgb(var(--foreground) / 0.8);
  cursor: pointer;
  padding: 4px;
}

.nav-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 20px 16px;
  border-top: 1px solid rgb(var(--border) / 0.3);
}

.nav-mobile-menu a {
  font-size: 14px;
  font-weight: 500;
  color: rgb(var(--foreground) / 0.7);
  text-decoration: none;
  padding: 8px 0;
  transition: color 200ms;
}

.nav-mobile-menu a:hover {
  color: rgb(var(--foreground) / 1);
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgb(var(--accent) / 0.10), transparent 40%),
    radial-gradient(circle at 80% 20%, rgb(var(--border-strong) / 0.08), transparent 35%),
    radial-gradient(circle at 50% 80%, rgb(var(--accent) / 0.06), transparent 45%);
  pointer-events: none;
}

.hero-container {
  position: relative;
  max-width: 720px;
  text-align: center;
  z-index: 1;
}

.hero-badge {
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: rgb(var(--foreground) / 1);
  margin-bottom: 24px;
}

.hero-title-accent {
  display: block;
  background: linear-gradient(135deg, rgb(var(--accent) / 1), rgb(var(--ring) / 1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.7;
  color: rgb(var(--foreground) / 0.7);
  max-width: 600px;
  margin: 0 auto 36px;
}

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

.hero-meta {
  display: flex;
  justify-content: center;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgb(var(--border) / 0.6);
  background: rgb(var(--primary) / 0.7);
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 500;
  color: rgb(var(--foreground) / 0.7);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(var(--accent) / 1);
  box-shadow: 0 0 8px rgb(var(--accent) / 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================
   Sections
   ============================================ */
.section-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header .eyebrow {
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: rgb(var(--foreground) / 1);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 17px;
  line-height: 1.7;
  color: rgb(var(--foreground) / 0.65);
  max-width: 640px;
  margin: 0 auto;
}

/* ============================================
   Features
   ============================================ */
.features {
  padding: 100px 0;
}

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

.feature-card {
  border-radius: 20px;
  border: 1px solid rgb(var(--border) / 0.5);
  background: rgb(var(--surface-elevated) / 0.9);
  backdrop-filter: blur(12px);
  padding: 36px;
  box-shadow:
    inset 0 1px 0 rgb(var(--foreground) / 0.04),
    0 18px 44px -32px rgb(var(--shadow-strong) / 0.55);
  transition: border-color 200ms ease-out;
}

.feature-card:hover {
  border-color: rgb(var(--border-strong) / 0.5);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgb(var(--accent) / 0.12);
  color: rgb(var(--accent) / 1);
  margin-bottom: 24px;
}

.feature-title {
  font-size: 20px;
  font-weight: 600;
  color: rgb(var(--foreground) / 1);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 15px;
  line-height: 1.7;
  color: rgb(var(--foreground) / 0.65);
  margin-bottom: 20px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: rgb(var(--foreground) / 0.6);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(var(--accent) / 1);
}

/* ============================================
   Workflow
   ============================================ */
.workflow {
  padding: 100px 0;
  background:
    radial-gradient(circle at 10% 50%, rgb(var(--accent) / 0.06), transparent 50%),
    radial-gradient(circle at 90% 50%, rgb(var(--border-strong) / 0.05), transparent 45%);
}

.workflow-steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.workflow-step {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 32px;
  border-radius: 20px;
  border: 1px solid rgb(var(--border) / 0.4);
  background: rgb(var(--surface-elevated) / 0.75);
  backdrop-filter: blur(10px);
  transition: border-color 200ms ease-out, transform 200ms ease-out;
}

.workflow-step:hover {
  border-color: rgb(var(--border-strong) / 0.5);
  transform: translateY(-2px);
}

.workflow-step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: rgb(var(--accent) / 1);
  padding: 8px 12px;
  border-radius: 10px;
  background: rgb(var(--accent) / 0.1);
  white-space: nowrap;
  flex-shrink: 0;
}

.workflow-step-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: rgb(var(--foreground) / 1);
  margin-bottom: 8px;
}

.workflow-step-content p {
  font-size: 15px;
  line-height: 1.7;
  color: rgb(var(--foreground) / 0.65);
  margin-bottom: 16px;
}

/* ============================================
   Hotkeys
   ============================================ */
.hotkeys {
  padding: 80px 0;
}

.hotkeys-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 48px;
  border-radius: 24px;
  border: 1px solid rgb(var(--border) / 0.5);
  background: rgb(var(--surface-elevated) / 0.9);
  box-shadow:
    inset 0 1px 0 rgb(var(--foreground) / 0.04),
    0 18px 44px -32px rgb(var(--shadow-strong) / 0.55);
}

.hotkeys-content {
  flex: 1;
}

.hotkeys-content h3 {
  font-size: 24px;
  font-weight: 700;
  color: rgb(var(--foreground) / 1);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.hotkeys-content p {
  font-size: 15px;
  line-height: 1.7;
  color: rgb(var(--foreground) / 0.65);
}

.hotkeys-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 280px;
}

.hotkey-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgb(var(--border) / 0.4);
  background: rgb(var(--primary) / 0.5);
}

.hotkey-label {
  font-size: 14px;
  font-weight: 500;
  color: rgb(var(--foreground) / 0.8);
}

/* ============================================
   Download
   ============================================ */
.download {
  padding: 80px 0 120px;
}

.download-card {
  text-align: center;
  padding: 64px 48px;
  border-radius: 28px;
  border: 1px solid rgb(var(--border) / 0.5);
  background:
    radial-gradient(circle at top left, rgb(var(--accent) / 0.10), transparent 35%),
    radial-gradient(circle at bottom right, rgb(var(--border-strong) / 0.08), transparent 30%),
    rgb(var(--surface-elevated) / 0.95);
  box-shadow:
    inset 0 1px 0 rgb(var(--foreground) / 0.04),
    0 28px 80px -36px rgb(var(--shadow-strong) / 0.72);
}

.download-content .eyebrow {
  margin-bottom: 16px;
}

.download-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 36px;
  margin-bottom: 20px;
}

.download-platforms {
  font-size: 13px;
  color: rgb(var(--foreground) / 0.45);
  font-family: var(--font-mono);
}

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

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

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

.footer-brand-text {
  font-size: 15px;
  font-weight: 600;
  color: rgb(var(--foreground) / 0.9);
}

.footer-copy {
  font-size: 13px;
  color: rgb(var(--foreground) / 0.45);
}

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

.footer-links a {
  font-size: 13px;
  font-weight: 500;
  color: rgb(var(--foreground) / 0.55);
  text-decoration: none;
  transition: color 200ms;
}

.footer-links a:hover {
  color: rgb(var(--foreground) / 1);
}

/* ============================================
   Reveal Animation
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
}

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

/* Stagger children */
.reveal-stagger .reveal {
  transition-delay: calc(var(--i, 0) * 80ms);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .navbar {
    top: 12px;
    left: 12px;
    right: 12px;
  }

  .nav-links {
    display: none;
  }

  .nav-mobile-toggle {
    display: block;
  }

  .nav-mobile-menu.open {
    display: flex;
  }

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

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

  .workflow-step {
    flex-direction: column;
    gap: 16px;
  }

  .hotkeys-card {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }

  .hotkeys-list {
    width: 100%;
    min-width: auto;
  }

  .download-card {
    padding: 40px 24px;
  }

  .download-actions {
    flex-direction: column;
    width: 100%;
  }

  .download-actions .btn {
    width: 100%;
  }

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

@media (min-width: 769px) and (max-width: 1040px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

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