/* ============================================
   Keylinx Studio Landing Page — Vanilla CSS
   Palette: #9333ea, #db2777, #f472b6, #c084fc
   Fonts: Sora (headings), Manrope (body)
   ============================================ */

:root {
  --bg: #09090b;
  --fg: #f8fafc;
  --primary: #9333ea;
  --accent-pink: #db2777;
  --accent-light: #f472b6;
  --accent-soft: #c084fc;
  --border: rgba(192, 132, 252, 0.2);
  --surface: rgba(255, 255, 255, 0.05);
  --font-display: 'Sora', sans-serif;
  --font-body: 'Manrope', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(219, 39, 119, 0.3);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.logo-x {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent-pink));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.logo-accent {
  color: var(--accent-soft);
}

.btn-login {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-login:hover {
  border-color: rgba(244, 114, 182, 0.5);
  box-shadow: 0 0 20px rgba(244, 114, 182, 0.3);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  padding-top: 160px;
  padding-bottom: 128px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 600px;
  background: linear-gradient(to bottom, rgba(147, 51, 234, 0.2), transparent);
  filter: blur(120px);
  pointer-events: none;
}

.hero-pulse {
  position: absolute;
  top: 80px;
  right: 10%;
  width: 256px;
  height: 256px;
  background: rgba(219, 39, 119, 0.2);
  filter: blur(100px);
  border-radius: 50%;
  animation: pulse-glow 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

.hero-content {
  position: relative;
  max-width: 768px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.gradient-text {
  background: linear-gradient(to right, var(--accent-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.25rem;
  color: rgba(248, 250, 252, 0.6);
  line-height: 1.6;
  max-width: 576px;
  margin-bottom: 2.5rem;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1px;
  background: linear-gradient(to right, var(--primary), var(--accent-pink));
  border-radius: 1rem;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.btn-hero:active {
  transform: scale(0.95);
}

.btn-hero-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--bg);
  border-radius: 15px;
  color: var(--fg);
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn-hero:hover .btn-hero-inner {
  background: transparent;
  color: #fff;
}

.arrow {
  font-size: 1.25rem;
}

/* ============================================
   Features — Zigzag
   ============================================ */
.feature {
  padding: 64px 0;
}

.feature-alt {
  background: rgba(255, 255, 255, 0.02);
}

.feature-grid {
  display: grid;
  gap: 4rem;
  align-items: center;
}

.feature-media {
  position: relative;
}

.media-wrap {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s ease;
}

.media-wrap:hover {
  transform: rotate(-1deg);
}

.feature-flipped .media-wrap:hover {
  transform: rotate(1deg);
}

.media-pulse-wrap:hover {
  transform: scale(1.02);
}

.feature-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 1.5rem;
}

.floating-x {
  position: absolute;
  bottom: -24px;
  right: -24px;
  width: 128px;
  height: 128px;
  background: white;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3rem;
  color: #000;
  transform: rotate(12deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s ease;
}

.media-wrap:hover + .floating-x,
.feature-media:hover .floating-x {
  transform: rotate(0deg);
}

.feature-text {
  padding: 0;
}

.feature-tag {
  display: inline-block;
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  background: rgba(147, 51, 234, 0.1);
  border: 1px solid rgba(147, 51, 234, 0.2);
  color: var(--accent-soft);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.tag-pink {
  background: rgba(219, 39, 119, 0.1);
  border-color: rgba(219, 39, 119, 0.2);
  color: var(--accent-light);
}

.tag-soft {
  background: rgba(192, 132, 252, 0.1);
  border-color: rgba(192, 132, 252, 0.2);
  color: var(--accent-soft);
}

.feature-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.feature-desc {
  font-size: 1.125rem;
  color: rgba(248, 250, 252, 0.6);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: rgba(248, 250, 252, 0.8);
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-light {
  background: var(--accent-light);
}

.dot-pink {
  background: var(--accent-pink);
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-pill {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
  position: relative;
  padding: 128px 0;
  overflow: hidden;
  text-align: center;
}

.cta-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(147, 51, 234, 0.1), transparent);
  pointer-events: none;
}

.cta-content {
  position: relative;
}

.cta-x {
  width: 64px;
  height: 64px;
  background: var(--accent-pink);
  border-radius: 1rem;
  margin: 0 auto 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.875rem;
  color: #fff;
  transform: rotate(45deg);
  box-shadow: 0 0 40px rgba(219, 39, 119, 0.5);
}

.cta-x::before {
  content: 'X';
  transform: rotate(-45deg);
}

.cta-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 2rem;
}

.cta-desc {
  font-size: 1.25rem;
  color: rgba(248, 250, 252, 0.6);
  max-width: 576px;
  margin: 0 auto 3rem;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  padding: 1.25rem 3rem;
  background: #fff;
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.125rem;
  border-radius: 1rem;
  text-decoration: none;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transition: background 0.3s ease;
}

.btn-cta:hover {
  background: var(--accent-light);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.5;
}

.footer-x {
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.625rem;
  color: var(--bg);
}

.footer-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
}

.footer-links {
  display: flex;
  gap: 2rem;
  font-size: 0.875rem;
  color: rgba(248, 250, 252, 0.4);
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-soft);
}

/* ============================================
   Scroll Reveal Animation
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   Responsive — Desktop
   ============================================ */
@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .feature-flipped .feature-media {
    order: 2;
  }

  .feature-text {
    padding: 0 2rem;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ============================================
   Responsive — Tablet adjustments
   ============================================ */
@media (min-width: 768px) and (max-width: 1023px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

/* ============================================
   Responsive — Mobile
   ============================================ */
@media (max-width: 767px) {
  .hero {
    padding-top: 120px;
    padding-bottom: 80px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .feature {
    padding: 48px 0;
  }

  .feature-grid {
    gap: 2.5rem;
  }

  .floating-x {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    bottom: -16px;
    right: -8px;
  }

  .cta {
    padding: 80px 0;
  }

  .btn-cta {
    width: 100%;
    justify-content: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}
