:root {
  --primary: oklch(0.65 0.15 240);
  --secondary: oklch(0.75 0.08 300);
  --accent: oklch(0.7 0.12 30);
  --bg-primary: oklch(0.98 0.01 240);
  --bg-secondary: oklch(0.95 0.02 240);
  --text-primary: oklch(0.25 0.02 240);
  --text-secondary: oklch(0.45 0.02 240);
  --border: oklch(0.88 0.02 240);
  --shadow: oklch(0.25 0.02 240 / 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui,
    sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 2rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero {
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero .subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  opacity: 0.9;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.lang-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  transition: background 0.3s ease, transform 0.3s ease;
  font-weight: 500;

  &:hover,
  &.active {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
  }
}

/* Navigation */
nav {
  background: var(--bg-secondary);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;

  &:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
  }
}

/* Main content */
main {
  padding: 2rem 0;
}

section {
  margin-bottom: 4rem;
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid var(--border);
}

h2 {
  color: var(--primary);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
  text-align: center;
}

h3 {
  color: var(--secondary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: scale(1.05);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  display: block;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-card {
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border-left: 4px solid var(--primary);
  transition: box-shadow 0.3s ease, transform 0.3s ease;

  &:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px var(--shadow);
  }
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.download-section {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  text-align: center;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.download-btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;

  &:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }
}

.keyboard-demo {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  text-align: center;
}

.layout-section {
  margin-bottom: 2rem;
}

.layout-section h4 {
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.layout-panel {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.layout-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow) !important;
}

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

.key,
.modifier {
  min-width: 2.5rem;
  height: 2.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
  position: relative;

  & :hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
  }
}

.key.home-row {
  background: var(--accent);
  color: white;
}

.modifier {
  background: var(--secondary);
  color: white;
  font-weight: 600;
  padding: 0 2rem;
  /* flex: 1; */
}

.keyboard-demo {
  & .key:after {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    background: rgba(255, 255, 255);
    border-radius: 4px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  &[data-modifier="alt"] {
    & .key[data-alt]:after {
      /* content: attr(data-alt); */
    }
  }
  &[data-modifier="shift"] {
    & .key[data-shift]:after {
      /* content: attr(data-shift); */
    }
  }
  &[data-modifier="alt-shift"] {
    & .key[data-alt-shift]:after {
      /* content: attr(data-alt-shift); */
    }
  }
}

.contact-section {
  text-align: center;
  background: var(--bg-secondary);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  transition: background 0.3s ease, transform 0.3s ease;

  &:hover {
    background: var(--secondary);
    transform: translateY(-2px);
  }
}

footer {
  background: var(--text-primary);
  color: white;
  text-align: center;
  padding: 2rem 0;
  margin-top: 2rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.8s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
  .logo {
    width: 60px;
    height: 60px;
  }

  .hero-content {
    flex-direction: column;
    gap: 0.5rem;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .layout-visualization {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .layout-panel {
    font-size: 0.9rem !important;
    padding: 0.75rem !important;
  }

  .layout-section h4 {
    font-size: 1rem;
  }

  .layout-section h5 {
    font-size: 0.8rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .lang-switch {
    flex-direction: column;
    align-items: center;
  }

  .keyboard-row {
    flex-wrap: wrap;
  }

  .key {
    min-width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }
}

/* Language switching */
.lang-content {
  display: none;
}

.lang-content.active {
  display: block;
}
