/* ============================================================
   GlueyKeys - Landing Page Styles
   ============================================================ */

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

:root {
  --garnet: #A91D47;
  --garnet-dark: #8B1538;
  --wire-border: #e5e7eb;
  --wire-text: #d4d7dc;
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --bg: #fff;
}

html {
  scroll-behavior: auto;
}

.garnet-text {
  color: var(--garnet);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =====================================================
   HERO
   ===================================================== */

.hero {
  position: relative;
  height: 280vh;
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
}

/* Hero title - sits ABOVE the keyboard (version 5 layout) */
.hero-title {
  position: absolute;
  top: 8vh;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 2;
  will-change: opacity, transform;
  pointer-events: none;
}

.hero-title h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.hero-title h1 span {
  background: linear-gradient(135deg, var(--garnet), var(--garnet-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title p {
  margin-top: 12px;
  font-size: clamp(14px, 1.6vw, 18px);
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero CTA - zooms in as garnet keys scatter away */
.hero-cta {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  will-change: opacity, transform;
  z-index: 1;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.hero-cta-inner {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
}

.hero-cta.visible {
  pointer-events: auto;
  z-index: 20;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 5vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  will-change: opacity;
  z-index: 2;
}

.scroll-hint span {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* =====================================================
   KEYBOARD
   ===================================================== */

.keyboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.2vw, 14px);
  width: 100%;
  padding: 0 clamp(8px, 2vw, 32px);
  margin-top: clamp(20px, 4vh, 48px);
  max-width: 1000px;
  z-index: 3;
}

.keyboard-row {
  display: flex;
  gap: clamp(5px, 1vw, 12px);
  width: 100%;
  justify-content: center;
}

.key {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 600;
  font-size: clamp(16px, 3vw, 42px);
  letter-spacing: -0.01em;
  user-select: none;
  cursor: default;
  will-change: transform, opacity;
  transition: none;
  flex: 0 0 clamp(48px, 8vw, 88px);
  aspect-ratio: 1 / 1;
}

.key--wire {
  background: transparent;
  border: clamp(1px, 0.2vw, 2.5px) solid var(--wire-border);
  color: var(--wire-text);
}

.key--garnet {
  background: linear-gradient(160deg, var(--garnet) 0%, var(--garnet-dark) 100%);
  border: none;
  color: #fff;
  font-size: clamp(22px, 4vw, 52px);
  font-weight: 800;
  z-index: 10;
  position: relative;
}

.key--garnet.lower {
  text-transform: lowercase;
  font-weight: 800;
}

.key--ghost {
  border: 2px solid #fff;
  color: #fff;
}

.key--win svg {
  width: clamp(16px, 3vw, 28px);
  height: clamp(16px, 3vw, 28px);
  fill: var(--wire-text);
}

.key--space {
  flex: none;
  width: calc(5 * clamp(48px, 8vw, 88px) + 4 * clamp(5px, 1vw, 12px));
  height: clamp(48px, 8vw, 88px);
  background: transparent;
  border: clamp(1px, 0.2vw, 2.5px) solid var(--garnet);
  color: var(--garnet);
  font-size: clamp(13px, 1.8vw, 22px);
  font-weight: 600;
  letter-spacing: 0.02em;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.key--space:hover {
  background: linear-gradient(160deg, var(--garnet) 0%, var(--garnet-dark) 100%);
  color: #fff;
}

.key--space svg {
  width: clamp(16px, 2vw, 24px);
  height: clamp(16px, 2vw, 24px);
  flex-shrink: 0;
  stroke: var(--garnet);
  transition: stroke 0.2s ease;
}

.key--space:hover svg {
  stroke: #fff;
}

/* =====================================================
   CONTENT - revealed from below (version 9 approach)
   ===================================================== */

.content {
  position: relative;
  z-index: 10;
  background: var(--bg);
}

.content-reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: none;
  will-change: opacity, transform;
}

/* =====================================================
   VALUE PROP
   ===================================================== */

.value-prop {
  padding: 120px clamp(20px, 5vw, 80px);
  max-width: 1080px;
  margin: 0 auto;
}

.value-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 24px;
}

.value-subtitle {
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 48px;
}

.value-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.value-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.value-feature svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: var(--garnet);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =====================================================
   THE PROBLEM
   ===================================================== */

.problem {
  padding: 120px clamp(20px, 5vw, 80px);
  max-width: 1080px;
  margin: 0 auto;
}

.problem-subtitle {
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--text-secondary);
  margin-top: -48px;
  margin-bottom: 56px;
  line-height: 1.6;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}

.problem-card {
  padding: 32px;
  border-radius: 16px;
  border: 1px solid #f0f0f0;
  background: #fafafa;
}

.problem-quote {
  font-size: 15px;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.problem-source {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.problem-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 56px;
}

.problem-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.problem-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: var(--garnet);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-top: 2px;
}

.problem-item strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

.problem-solution {
  text-align: center;
  padding: 48px 0;
}

.problem-solution h3 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.problem-solution p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

/* =====================================================
   FEATURES (version 5 styling)
   ===================================================== */

.features {
  padding: 120px clamp(20px, 5vw, 80px);
  max-width: 1080px;
  margin: 0 auto;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--garnet);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 64px;
}

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

.feature-card {
  padding: 36px 32px;
  border-radius: 16px;
  border: 1px solid #f0f0f0;
  background: #fafafa;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  border-color: #e5e5e5;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(169, 29, 71, 0.08), rgba(139, 21, 56, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--garnet);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

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

/* =====================================================
   DOWNLOAD CTA
   ===================================================== */

.download-cta {
  padding: 100px clamp(20px, 5vw, 80px);
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.download-cta p {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: #fff;
  color: var(--garnet);
  border: 2px solid var(--garnet);
  text-decoration: none;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 700;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.download-btn:hover {
  background: linear-gradient(135deg, var(--garnet), var(--garnet-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(169, 29, 71, 0.25);
}

.download-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.download-btn:hover svg {
  fill: #fff;
}

/* =====================================================
   OPEN SOURCE (version 5 oss-box style)
   ===================================================== */

.open-source {
  padding: 100px clamp(20px, 5vw, 80px);
  max-width: 1080px;
  margin: 0 auto;
}

.oss-box {
  border-radius: 20px;
  border: 1px solid #f0f0f0;
  background: #fafafa;
  padding: 64px;
  text-align: center;
}

.oss-box .section-label {
  margin-bottom: 16px;
}

.oss-box h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.oss-box p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 36px;
}

.oss-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.oss-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.oss-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.oss-link-primary {
  background: linear-gradient(135deg, var(--garnet), var(--garnet-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(169, 29, 71, 0.15);
}

.oss-link-primary:hover {
  box-shadow: 0 4px 16px rgba(169, 29, 71, 0.3);
}

.oss-link-secondary {
  background: #fff;
  color: var(--text-primary);
  border: 1px solid #e5e5e5;
}

.oss-link-secondary:hover {
  border-color: var(--wire-border);
  background: #f9fafb;
}


/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 640px) {
  .key {
    border-radius: 10px;
    aspect-ratio: 1 / 1;
  }

  .key--space {
    width: calc(5 * clamp(48px, 8vw, 88px) + 4 * clamp(3px, 1.2vw, 6px));
    height: clamp(48px, 8vw, 88px);
    border-radius: 10px;
  }

  .keyboard {
    gap: clamp(4px, 1.5vw, 8px);
  }

  .keyboard-row {
    gap: clamp(3px, 1.2vw, 6px);
  }

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

  .oss-box {
    padding: 40px 24px;
  }

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

  .hero-title h1 {
    font-size: clamp(22px, 5.5vw, 36px);
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
