:root {
  --color-primary: #e07a5f;
  --color-secondary: #3d405b;
  --color-accent: #f2cc8f;
  --color-success: #81b29a;
  
  --bg-primary: #1a1a2e;
  --bg-secondary: #25253d;
  --bg-tertiary: #2f2f4a;
  
  --text-primary: #fefefe;
  --text-secondary: #a8a8c0;
  --text-muted: #6b6b85;
  
  --font-main: 'Cabinet Grotesk', -apple-system, sans-serif;
  
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

.grain-overlay {
  position: fixed;
  inset: 0;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1000;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  position: relative;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  font-size: 1.5rem;
  color: var(--color-primary);
}

.logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.launch-badge {
  background: var(--bg-tertiary);
  color: var(--color-accent);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(242, 204, 143, 0.2);
}

.hero {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 2rem 4rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-content {
  max-width: 580px;
}

.hero-eyebrow {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.hero-headline {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.highlight {
  color: var(--color-accent);
  position: relative;
  display: inline-block;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 0.1em;
  left: 0;
  right: 0;
  height: 0.15em;
  background: var(--color-primary);
  opacity: 0.6;
  border-radius: 0.1em;
}

.hero-subtext {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.signup-form {
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.form-group input {
  flex: 1;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg-secondary);
  border: 2px solid var(--bg-tertiary);
  border-radius: 0.75rem;
  color: var(--text-primary);
  transition: border-color 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo);
}

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

.form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(224, 122, 95, 0.15);
}

.submit-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  background: var(--color-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out-back), background 0.3s ease;
  white-space: nowrap;
}

.submit-btn:hover {
  background: #c96a52;
  transform: translateY(-2px);
}

.submit-btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.submit-btn:active {
  transform: translateY(0);
}

.btn-icon {
  transition: transform 0.3s var(--ease-out-expo);
}

.submit-btn:hover .btn-icon {
  transform: translateX(4px);
}

.form-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.note-icon {
  color: var(--color-accent);
}

.success-message {
  background: var(--bg-secondary);
  border: 2px solid var(--color-success);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  animation: slideUp 0.5s var(--ease-out-expo);
}

.success-icon {
  width: 3rem;
  height: 3rem;
  background: var(--color-success);
  color: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.success-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.success-text {
  color: var(--text-secondary);
}

.position-display {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg-tertiary);
  color: var(--color-accent);
  font-weight: 600;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.keyboard-preview {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid var(--bg-tertiary);
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 20px 40px rgba(0, 0, 0, 0.2);
}

.key-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

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

.key-row.offset {
  margin-left: 1.5rem;
}

.key {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s var(--ease-out-back), box-shadow 0.2s ease;
  cursor: default;
  position: relative;
}

.key:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.texture-soft {
  background: linear-gradient(145deg, #4a4a6a, #3a3a5a);
  color: var(--text-primary);
}

.texture-soft::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 0.35rem;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 60%);
}

.texture-rough {
  background: linear-gradient(145deg, #5a5a7a, #4a4a6a);
  color: var(--text-primary);
  background-image: 
    linear-gradient(145deg, #5a5a7a, #4a4a6a),
    repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
}

.texture-ridge {
  background: linear-gradient(145deg, #6a5a7a, #5a4a6a);
  color: var(--text-primary);
  background-image: 
    linear-gradient(145deg, #6a5a7a, #5a4a6a),
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.05) 3px, rgba(255,255,255,0.05) 6px);
}

.texture-bump {
  background: linear-gradient(145deg, #7a6a5a, #6a5a4a);
  color: var(--text-primary);
  position: relative;
}

.texture-bump::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  box-shadow: 
    -12px 0 0 rgba(255,255,255,0.1),
    12px 0 0 rgba(255,255,255,0.1);
}

.visual-caption {
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.feature {
  text-align: center;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 1rem;
  border: 1px solid var(--bg-tertiary);
  transition: transform 0.3s var(--ease-out-expo), border-color 0.3s ease;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
}

.feature-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  margin: 0 auto 1rem;
}

.texture-demo.soft {
  background: linear-gradient(145deg, #4a4a6a, #3a3a5a);
}

.texture-demo.rough {
  background: 
    linear-gradient(145deg, #5a5a7a, #4a4a6a),
    repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.05) 2px, rgba(255,255,255,0.05) 4px);
}

.texture-demo.bump {
  background: linear-gradient(145deg, #7a6a5a, #6a5a4a);
  position: relative;
}

.texture-demo.bump::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  box-shadow: 
    -10px 0 0 rgba(255,255,255,0.15),
    10px 0 0 rgba(255,255,255,0.15),
    0 -10px 0 rgba(255,255,255,0.15),
    0 10px 0 rgba(255,255,255,0.15);
}

.feature h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--bg-tertiary);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 2rem;
    min-height: auto;
    padding-top: 1rem;
  }

  .hero-content {
    max-width: 100%;
    order: 1;
  }

  .hero-visual {
    order: 2;
  }

  .desktop-break {
    display: none;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 1rem 1.5rem;
  }

  .hero {
    padding: 1.5rem;
  }

  .hero-headline {
    font-size: 2rem;
  }

  .hero-subtext {
    font-size: 1rem;
  }

  .form-group {
    flex-direction: column;
  }

  .submit-btn {
    width: 100%;
    justify-content: center;
  }

  .keyboard-preview {
    padding: 1.25rem;
    transform: scale(0.85);
    transform-origin: center;
  }

  .key {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 0.875rem;
  }

  .features {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
    gap: 1rem;
  }

  .feature {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 1rem;
  }

  .launch-badge {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }

  .hero-headline {
    font-size: 1.75rem;
  }

  .keyboard-preview {
    transform: scale(0.75);
  }
}