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

:root {
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-glow: rgba(16, 185, 129, 0.15);
  --secondary: #10B981;
  --accent: #10B981;
  --dark: #0A0E27;
  --darker: #05070F;
  --light: #F9FAFB;
  --gray: #6B7280;
  --max-width: 1400px;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--darker);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--darker);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.8rem 1.5rem;
  background: var(--primary);
  color: white;
  border-radius: 0 0 8px 8px;
  z-index: 200;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

nav.scrolled {
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(20px);
  padding: 1rem 5%;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  -webkit-text-fill-color: var(--primary);
  background: none;
  z-index: 101;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 101;
}

.mobile-menu-btn span {
  width: 28px;
  height: 3px;
  background: var(--light);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0 5%;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.6;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary), transparent);
  top: -10%;
  right: 10%;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--primary-dark), transparent);
  bottom: 10%;
  left: 5%;
  animation-delay: 5s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--primary), transparent);
  top: 50%;
  left: 50%;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
}

.hero-label {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: var(--primary-glow);
  border: 1px solid var(--primary);
  border-radius: 50px;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards 0.2s;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards 0.4s;
}

.gradient-text {
  color: var(--primary);
  background: none;
  -webkit-text-fill-color: var(--primary);
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--gray);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards 0.6s;
}

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

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards 0.8s;
}

.btn {
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 30px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(16, 185, 129, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--light);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

/* Section Styles */
section {
  padding: 6rem 5%;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.section-label {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: var(--primary-glow);
  border: 1px solid var(--primary);
  border-radius: 50px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.section-description {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--gray);
  max-width: 700px;
  margin-bottom: 4rem;
}

/* About Section */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-content h2 {
  margin-bottom: 2rem;
}

.about-text {
  font-size: 1.1rem;
  color: var(--gray);
  margin-bottom: 2rem;
  line-height: 1.8;
}

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

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  width: 100%;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 2rem;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 16px;
  border-left: 3px solid var(--primary);
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--gray);
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-top: 4rem;
}

.service-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 2.5rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}

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

.service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.15);
}

.service-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-glow);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
  flex-shrink: 0;
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.service-description {
  color: var(--gray);
  margin-bottom: 1.5rem;
  line-height: 1.7;
  flex-grow: 1;
}

.service-card .btn {
  width: 100%;
  padding: 0.9rem 2rem;
  font-size: 0.95rem;
  margin-top: auto;
}

/* Technologies Section */
.technologies {
  background: linear-gradient(180deg, transparent, rgba(16, 185, 129, 0.03), transparent);
  padding: 8rem 5%;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  margin-top: 4rem;
  align-items: center;
  justify-items: center;
}

.tech-item {
  width: 130px;
  height: 130px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.tech-item:hover {
  transform: translateY(-10px) scale(1.05);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.15);
}

.tech-logo {
  color: var(--gray);
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-item:hover .tech-logo {
  color: var(--primary);
}

.tech-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
  transition: color 0.3s ease;
  text-align: center;
}

.tech-item:hover .tech-name {
  color: var(--light);
}

/* Process Section */
.process {
  background: linear-gradient(180deg, transparent, rgba(16, 185, 129, 0.03), transparent);
  padding: 8rem 5%;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 3rem;
  margin-top: 4rem;
}

.process-step {
  text-align: center;
}

.step-number {
  width: 80px;
  height: 80px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.process-step h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.process-step p {
  color: var(--gray);
  line-height: 1.6;
}

/* Contact Section */
.contact {
  padding: 8rem 5%;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--light);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--light);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.char-counter {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 0.4rem;
}

.char-counter.near-limit {
  color: #F59E0B;
}

.char-counter.at-limit {
  color: #EF4444;
}

.contact-info {
  padding-top: 2rem;
}

.info-item {
  display: flex;
  align-items: start;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-icon {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.info-content h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.info-content p {
  color: var(--gray);
  line-height: 1.6;
}

/* Footer */
footer {
  background: var(--dark);
  padding: 3rem 5%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
  color: var(--gray);
  font-size: 0.95rem;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 3rem;
  align-items: center;
}

.footer-brand p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: right;
}

/* Footer Legal Links */
.footer-legal-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.footer-legal-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

.footer-legal-links a:hover {
  color: var(--primary);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.2rem 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  z-index: 150;
  transform: translateY(0);
  transition: transform 0.4s ease;
}

.cookie-banner.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.cookie-banner p {
  color: var(--gray);
  font-size: 0.9rem;
  margin: 0;
}

.cookie-banner a {
  color: var(--primary);
  text-decoration: none;
}

.cookie-btn {
  padding: 0.6rem 1.5rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.stagger {
  transition-delay: calc(var(--stagger-delay) * 0.1s);
}

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

/* Tablets grandes y escritorio pequeño */
@media (max-width: 1200px) {
  :root {
    font-size: 15px;
  }

  .tech-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }

}

/* Tablets */
@media (max-width: 1024px) {
  nav {
    padding: 1.2rem 4%;
  }

  nav.scrolled {
    padding: 0.9rem 4%;
  }

  .nav-links {
    gap: 2rem;
    font-size: 0.9rem;
  }

  section {
    padding: 5rem 4%;
  }

  .technologies,
  .process,
  .contact {
    padding: 6rem 4%;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .about-visual {
    order: -1;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .tech-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Móviles grandes */
@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }

  nav {
    padding: 1rem 5%;
  }

  nav.scrolled {
    padding: 0.8rem 5%;
  }

  .logo {
    font-size: 1.5rem;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 300px;
    height: 100vh;
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 99;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  section {
    padding: 4rem 5%;
  }

  .technologies,
  .process,
  .contact {
    padding: 5rem 5%;
  }

  .hero {
    min-height: 90vh;
    padding: 0 5%;
  }

  .hero-label {
    font-size: 0.75rem;
    padding: 0.4rem 1.2rem;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 350px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .service-card {
    padding: 2rem;
  }

  .process-steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .tech-item {
    width: 100%;
    height: 110px;
    max-width: 110px;
    margin: 0 auto;
  }

  .contact-form {
    padding: 2rem;
  }

  .info-item {
    padding: 1.2rem;
    flex-direction: row;
  }

  .info-icon {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

  .step-number {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-legal {
    text-align: center;
  }

  .footer-legal-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .cookie-banner {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem 5%;
  }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  :root {
    font-size: 14px;
  }

  .logo {
    font-size: 1.3rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  section {
    padding: 3rem 5%;
  }

  .technologies,
  .process,
  .contact {
    padding: 4rem 5%;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  .tech-item {
    width: 100%;
    height: 100px;
    max-width: 100px;
  }

  .service-icon {
    width: 56px;
    height: 56px;
  }

  .step-number {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.85rem;
  }

  .info-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .orb-1, .orb-2, .orb-3 {
    width: 300px;
    height: 300px;
    filter: blur(80px);
  }
}

/* Dispositivos muy pequeños */
@media (max-width: 360px) {
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .tech-item {
    height: 90px;
    max-width: 90px;
  }

  .nav-links {
    width: 85%;
  }
}

/* Reducir animaciones pesadas en móvil */
@media (max-width: 768px) {
  .gradient-orb {
    filter: blur(60px);
    opacity: 0.4;
    animation: none;
  }
}

/* Accesibilidad: movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .gradient-orb {
    animation: none;
  }
}
