/* ========================================
   VARIABLES
======================================== */
:root {
  --color-bg: #0a0a0f;
  --color-bg-secondary: #12121a;
  --color-text: #ffffff;
  --color-text-muted: #9ca3af;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-button: linear-gradient(135deg, #1DA1F2, #00E6A8, #A8E600);
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Plus Jakarta Sans', Georgia, serif;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --glow-soft: 0 0 20px rgba(102, 126, 234, 0.3);
  --glow-medium: 0 0 30px rgba(102, 126, 234, 0.4);
}

/* ========================================
   RESET Y BASE
======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  letter-spacing: -0.01em;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg { max-width: 100%; height: auto; }

/* ========================================
   UTILIDADES
======================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ========================================
   BOTONES
 ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  min-height: 48px;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  animation: fadeInUp 0.8s var(--transition-base) both;
  animation-delay: 0.45s;
  white-space: nowrap;
  position: relative;
}

.btn--primary {
  color: white;
  background: var(--gradient-button);
  background-size: 200% 200%;
  box-shadow: 0 10px 30px rgba(29, 161, 242, 0.25), var(--glow-soft);
  animation: gradientShift 5s ease infinite;
  transition: all var(--transition-smooth);
}

.btn--primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px rgba(29, 161, 242, 0.4), var(--glow-medium);
  filter: brightness(1.08);
}

.btn--primary:active { 
  transform: translateY(-1px) scale(0.99);
  box-shadow: 0 5px 20px rgba(29, 161, 242, 0.3);
}

.btn__icon {
  font-size: 1.125rem;
  transition: transform var(--transition-base);
}

.btn:hover .btn__icon { transform: translateX(4px); }

.btn__shine {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn:hover .btn__shine { transform: translateX(100%); }

/* ========================================
   CTA SECTION
======================================== */
.cta {
  background: linear-gradient(180deg, var(--color-bg) 0%, #0d0d12 100%);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta__container {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 1.5rem;
}

.cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 2.25rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  animation: fadeInUp 0.6s ease both;
}

.cta__button {
  position: relative;
  padding: 1rem 2.5rem;
  min-height: 52px;
  font-size: 1rem;
  box-shadow: 0 10px 30px rgba(29, 161, 242, 0.3);
  animation: fadeInUp 0.6s ease both 0.2s;
}

.cta__button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(29, 161, 242, 0.4);
}

/* ========================================
   CONTACT SECTION
======================================== */
.contact {
  background-color: #0a0a0f;
  padding: 4.5rem 1.5rem;
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(118, 75, 162, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.contact__wrapper {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.contact .section-title {
  margin-bottom: 0;
}

.contact__description {
  font-family: var(--font-primary);
  font-size: 1rem;
  color: var(--color-text-muted);
  text-align: center;
  max-width: 640px;
  line-height: 1.75;
}

.contact__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .contact__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact__field--full {
  grid-column: 1 / -1;
}

.contact__label {
  font-family: var(--font-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.contact__input,
.contact__textarea {
  width: 100%;
  padding: 1rem 1.375rem;
  font-family: var(--font-primary);
  font-size: 1rem;
  color: var(--color-text);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.contact__input::placeholder,
.contact__textarea::placeholder {
  color: var(--color-text-muted);
}

.contact__input:hover,
.contact__textarea:hover {
  border-color: rgba(102, 126, 234, 0.3);
  background-color: rgba(255, 255, 255, 0.07);
}

.contact__input:focus,
.contact__textarea:focus {
  outline: none;
  border-color: #667eea;
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.contact__textarea {
  border-radius: var(--radius-lg);
  resize: vertical;
  min-height: 120px;
}

.contact__button {
  margin-top: 0.5rem;
  width: 100%;
  max-width: 280px;
  align-self: center;
}

@media (min-width: 640px) {
  .contact__button {
    width: auto;
  }
}

.contact__email {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.contact__email-icon {
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.contact__email a {
  font-family: var(--font-primary);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all var(--transition-base);
}

.contact__email a:hover {
  color: #667eea;
}

/* ========================================
    CONTACT SUCCESS MESSAGE
  ======================================== */
.contact__success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: var(--radius-lg);
  animation: fadeInUp 0.5s ease both;
}

.contact__success-icon {
  width: 64px;
  height: 64px;
  color: #10b981;
  margin-bottom: 1.5rem;
  animation: pulse 0.6s ease both;
}

.contact__success-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 1.75rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.contact__success-text {
  font-family: var(--font-primary);
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ========================================
    ANIMACIONES
  ======================================== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

/* ========================================
   ACCESIBILIDAD
======================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

::selection {
  background-color: rgba(102, 126, 234, 0.3);
  color: var(--color-text);
}