@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap");

:root {
  --primary: #c40000;
  --primary-glow: rgba(196, 0, 0, 0.5);
  --bg-dark: #050505;
  --text-white: #ffffff;
  --text-gray: #b3b3b3;
  --font-main: "Poppins", sans-serif;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --header-height: 80px;
}

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

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-white);
  font-family: var(--font-main);
  overflow-x: hidden;
  position: relative;
  min-height: 100dvh;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

.background-glow {
  position: fixed;
  top: -20%;
  left: -20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  transform: translateZ(0);
}

main {
  width: 100%;
  overflow: hidden;
}

.hero {
  min-height: calc(100dvh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 5%;
  width: 100%;
  position: relative;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 6rem);
  max-width: 1200px;
  width: 100%;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  z-index: 2;
}

.hero-content h1 {
  font-size: clamp(3.8rem, 5vw + 1rem, 7rem);
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
}

.text-highlight {
  color: var(--primary);
  text-shadow: 0 0 25px var(--primary-glow);
}

.hero-content h3 {
  font-size: clamp(2rem, 3vw, 3.5rem);
  font-weight: 600;
  color: var(--text-white);
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.typing-text::after {
  content: "|";
  animation: typing 10s infinite steps(1);
  color: var(--primary);
}

@keyframes typing {
  0% {
    content: "Útil";
  }

  20% {
    content: "Rápido";
  }

  40% {
    content: "Eficaz";
  }

  60% {
    content: "Increíble";
  }

  80% {
    content: "Divertido";
  }

  100% {
    content: "CrowBot";
  }
}

.hero-content p {
  font-size: clamp(1.4rem, 2vw, 1.6rem);
  line-height: 1.6;
  color: var(--text-gray);
  max-width: 90%;
  text-wrap: pretty;
}

.cta-group {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 1.4rem 3.5rem;
  background: var(--primary);
  color: white;
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  box-shadow: 0 0 15px var(--primary-glow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  white-space: nowrap;
  will-change: transform, box-shadow;
}

@media (hover: hover) {
  .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 35px var(--primary);
    background: white;
    color: var(--primary);
  }

  .social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-3px) rotate(10deg);
    box-shadow: 0 0 20px var(--primary-glow);
  }
}

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

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-white);
  font-size: 1.8rem;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.image-glow {
  position: absolute;
  width: 60%;
  height: 60%;
  background: var(--primary);
  filter: blur(90px);
  opacity: 0.5;
  z-index: -1;
  border-radius: 50%;
  transform: translateZ(0);
}

.floating-img {
  width: 100%;
  height: auto;
  max-width: 450px;
  filter: drop-shadow(0 0 30px rgba(196, 0, 0, 0.4));
  animation: float 6s ease-in-out infinite;
  will-change: transform;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

.features {
  padding: 8rem 5%;
  background: linear-gradient(to top, #000000, var(--bg-dark));
  width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 6rem;
  padding: 0 1rem;
}

.section-header h2 {
  font-size: clamp(3rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
  text-wrap: balance;
}

.section-header p {
  font-size: 1.6rem;
  color: var(--text-gray);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  width: 100%;
}

.feature-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem;
  border-radius: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}

@media (hover: hover) {
  .feature-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  }

  .feature-card:hover::before {
    transform: scaleX(1);
  }

  .feature-card:hover .icon-box {
    background: var(--primary);
    color: white;
    transform: rotateY(360deg);
  }
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.icon-box {
  width: 60px;
  height: 60px;
  background: rgba(196, 0, 0, 0.1);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.4rem;
  color: var(--primary);
  margin-bottom: 2rem;
  transition: var(--transition);
  will-change: transform, background-color;
}

.feature-card h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: white;
}

.feature-card p {
  font-size: 1.4rem;
  color: var(--text-gray);
  line-height: 1.6;
  flex-grow: 1;
}

@media (max-width: 991px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 5rem;
  }

  .hero-content {
    align-items: center;
  }

  .hero-content h3 {
    justify-content: center;
  }

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

  .hero-image {
    order: -1;
    margin-bottom: 1rem;
  }

  .floating-img {
    max-width: 350px;
  }

  .cta-group {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .hero-container {
    gap: 3rem;
  }

  .floating-img {
    max-width: 80%;
  }

  .btn-primary {
    width: 100%;
  }

  .cta-group {
    flex-direction: column;
    gap: 1.5rem;
  }

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

  .feature-card {
    padding: 2.5rem 2rem;
  }
}
