/**
 * Nubeala - Clean Elegant Design
 * Inspired by masdigital.net
 *
 * Characteristic:
 * - Clean modern design
 * - Simple bold typography
 * - Vibrant accent colors
 * - No 3D effects or parallax
 * - Smooth interactions
 * - Dark mode optimized
 */

/* ===== ANIMATED GRADIENT ===== */
@property --gradient-1 {
  syntax: '<color>';
  inherits: false;
  initial-value: #00b8d4;
}

@property --gradient-2 {
  syntax: '<color>';
  inherits: false;
  initial-value: #8b5cf6;
}

@property --gradient-3 {
  syntax: '<color>';
  inherits: false;
  initial-value: #f43f5e;
}

@keyframes gradient-shift {
  0% { --gradient-1: #00b8d4; --gradient-2: #8b5cf6; --gradient-3: #f43f5e; }
  33% { --gradient-1: #8b5cf6; --gradient-2: #f43f5e; --gradient-3: #00b8d4; }
  66% { --gradient-1: #f43f5e; --gradient-2: #00b8d4; --gradient-3: #8b5cf6; }
  100% { --gradient-1: #00b8d4; --gradient-2: #8b5cf6; --gradient-3: #f43f5e; }
}

.gradient-text {
  background: linear-gradient(to right, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 3s linear infinite;
}

/* ===== RESET & BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: #0f1117;
  color: #e0e7ff;
  line-height: 1.6;
}

/* ===== DARK MODE PALETTE ===== */
:root {
  --bg-deep: #0a0a0a;
  --bg-elevated: #121822;
  --bg-surface: #1a1d2e;
  --accent-cyan: #0ea5e9;
  --accent-rose: #f43f5e;
  --accent-green: #10b981;
  --accent-yellow: #fbbf24;
  --text-primary: #e0e7ff;
  --text-secondary: #94a3b8;
  --border-subtle: #1e293b;
}

/* ===== UTILITIES ===== */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mt-8 { margin-top: 4rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-8 { margin-bottom: 4rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-4 { padding: 2rem; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
  transition: transform 0.2s ease;
}

.navbar.hidden {
  transform: translateY(-100%);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.navbar-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-rose));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
}

.navbar-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.navbar-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.navbar-link:hover {
  color: var(--accent-cyan);
}

.navbar-link.active {
  color: var(--accent-cyan);
}

.navbar-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent-cyan);
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.navbar-toggle-line {
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  transition: transform 0.2s ease;
}

@media (max-width: 768px) {
  .navbar-toggle { display: flex; }
  
  .navbar-menu {
    display: none;
    flex-direction: column;
    gap: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-elevated);
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
  }
  
  .navbar-menu.open {
    display: flex;
  }
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: #0a0a0a;
  position: relative;
  padding: 4rem 1.5rem;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(135deg, rgba(0, 184, 216, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(0, 184, 216, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, #0e1115 0%, #0a0a0a 100%);
  z-index: 0;
}

.hero-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/imgs/hero_banner_dark.png');
  background-size: cover;
  background-position: center;
  opacity: 1;
  mix-blend-mode: screen;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: #fff;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 184, 216, 0.4);
}

.hero-description {
  font-size: 1.125rem;
  color: #fff;
  line-height: 1.75;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
  opacity: 0.9;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  text-align: center;
  border: 1px solid transparent;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--accent-cyan);
  color: white;
}

.btn-primary:hover {
  background-color: #0284a8;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-secondary:hover {
  background-color: var(--accent-cyan);
  color: white;
}

/* ===== SECTIONS ===== */
section {
  padding: 6rem 0;
}

.bg-elevated {
  background-color: var(--bg-elevated);
  position: relative;
  overflow: hidden;
}

.wrapper {
  position: relative;
  z-index: 1;
}

/* ===== CYBERPUNK TITLE ROW ===== */
.cyber-title-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.cyber-word-large {
  border: none;
  padding: 1rem;
  position: relative;
}

.cyber-word-large:nth-child(1) .cyber-word {
  animation-delay: 0s;
}

.cyber-word-large:nth-child(2) .cyber-word {
  animation-delay: 0.5s;
}

.cyber-word-large:nth-child(3) .cyber-word {
  animation-delay: 1s;
}

.cyber-word {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: #00b8d4;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.5rem 1rem;
  animation: cyberWord 3s ease-in-out infinite;
}

@keyframes cyberWord {
  0%, 100% {
    text-shadow: 0 0 10px currentColor;
  }
  50% {
    text-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
  }
}

/* ===== CARDS ===== */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 2rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
}

/* Tarjetas About con efecto neon */
.about-cards {
  gap: 2rem;
}

.about-cards .card {
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-neon {
  position: relative;
  background: rgba(10, 10, 10, 0.85);
  border: 2px solid transparent;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.card-neon::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: linear-gradient(135deg, #00b8d4, #8b5cf6, #f43f5e, #00b8d4);
  background-size: 300% 300%;
  z-index: -1;
  animation: neon-gradient 3s ease infinite;
}

.card-neon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(10, 10, 10, 0.85);
  z-index: -1;
}

@keyframes neon-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.card-neon {
  animation: neon-glow 2s ease-in-out infinite alternate;
}

@keyframes neon-glow {
  0% { box-shadow: 0 0 10px rgba(0, 184, 216, 0.3), 0 0 20px rgba(139, 92, 246, 0.2); }
  100% { box-shadow: 0 0 15px rgba(244, 63, 94, 0.3), 0 0 25px rgba(0, 184, 216, 0.2); }
}

.card-neon:hover {
  transform: translateY(-4px);
}

.card img {
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  transition: transform 0.2s ease;
}

.card:hover img {
  transform: scale(1.05);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-rose));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Tarjetas de servicios expandibles */
.service-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card-expanded {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.4s ease;
  opacity: 0;
}

.service-card:hover .card-expanded,
.service-card:focus-within .card-expanded,
.service-card.active .card-expanded {
  max-height: 200px;
  opacity: 1;
  margin-top: 1rem;
}

.card-expanded p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

/* ===== GRID ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

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

/* ===== FOOTER ===== */
.footer {
  background-color: var(--bg-deep);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 1.5rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
  padding: 0.5rem 0;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ===== ANIMATIONS ===== */
.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.text-cyan { color: var(--accent-cyan); }
