/* =========================================================
   Digital Development S.A.S. — Custom Styles (Light Theme)
   ========================================================= */

/* ─── Design tokens ─── */
:root {
  --color-violet:       #7C3AED;
  --color-violet-light: #8B5CF6;
  --color-cyan:         #0891B2;   /* cyan-600 — más legible en claro */
  --color-cyan-light:   #06B6D4;

  /* Fondos */
  --bg-white:           #FFFFFF;
  --bg-pearl:           #F4F7F9;   /* gris-azul ultrasuave para Ecosistema SaaS */
  --bg-pearl-alt:       #EEF2F6;
  --bg-contact:         #0F172A;   /* slate-900 — bloque de cierre */

  /* Texto */
  --text-heading:       #0F172A;
  --text-body:          #334155;
  --text-muted:         #64748B;
  --text-light:         #94A3B8;
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-white);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
}

/* ─── Gradient text (mantiene el acento violeta→cian) ─── */
.text-gradient-violet-cyan {
  background: linear-gradient(135deg, #7C3AED, #0891B2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* ═══════════════════════════════════════
   NAVBAR — blanca con sombra al scroll
═══════════════════════════════════════ */
#navbar {
  background: rgba(255, 255, 255, 0);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.07);
}

/* Links de nav — oscuros en light mode */
.nav-link {
  color: #475569;
  position: relative;
}
.nav-link:hover { color: #0F172A; }

.nav-link.active { color: var(--color-violet); }

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-violet), var(--color-cyan));
  border-radius: 9999px;
  transition: width 0.3s ease;
}
.nav-link.active::after,
.nav-link:hover::after { width: 100%; }

/* ═══════════════════════════════════════
   HERO — gradiente suave sobre blanco
═══════════════════════════════════════ */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

#inicio {
  background: linear-gradient(160deg, #FFFFFF 0%, #F0EEFF 40%, #E8F4FD 70%, #FFFFFF 100%);
  background-size: 300% 300%;
  animation: gradientShift 14s ease infinite;
}

/* Orbes suaves en light */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-18px) rotate(5deg); }
  66%       { transform: translateY(-10px) rotate(-5deg); }
}

.shape-orb:nth-child(1) { animation: float 7s ease-in-out infinite; }
.shape-orb:nth-child(2) { animation: float 9s ease-in-out 1.5s infinite; }
.shape-orb:nth-child(3) { animation: float 11s ease-in-out 3s infinite; }

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.geo-shape { animation: spinSlow 20s linear infinite; }

/* ═══════════════════════════════════════
   REVEAL on scroll
═══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(.215,.61,.355,1),
              transform 0.65s cubic-bezier(.215,.61,.355,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal:nth-child(2) { transition-delay: 0.07s; }
.reveal:nth-child(3) { transition-delay: 0.14s; }
.reveal:nth-child(4) { transition-delay: 0.21s; }
.reveal:nth-child(5) { transition-delay: 0.28s; }
.reveal:nth-child(6) { transition-delay: 0.35s; }

/* ═══════════════════════════════════════
   TARJETAS — sombra sutil, fondo blanco
═══════════════════════════════════════ */
.service-card {
  will-change: transform;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Tarjetas sobre fondo perla (sección SaaS) */
.bg-pearl .service-card,
[data-section="saas"] .service-card {
  background: #FFFFFF;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 30px rgba(124,58,237,0.12), 0 2px 8px rgba(0,0,0,0.06);
}

/* ─── Tech badges (light) ─── */
.tech-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: #6D28D9;
  letter-spacing: 0.01em;
}

.tech-badge-cyan {
  background: rgba(8, 145, 178, 0.08);
  border-color: rgba(8, 145, 178, 0.22);
  color: #0369A1;
}

/* ─── Portfolio filter buttons (light) ─── */
.filter-btn {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #64748B;
  cursor: pointer;
}
.filter-btn:hover {
  border-color: rgba(124,58,237,0.4);
  color: #4C1D95;
  background: rgba(124,58,237,0.06);
}
.filter-btn.active {
  background: rgba(124,58,237,0.1);
  border-color: rgba(124,58,237,0.5);
  color: #6D28D9;
  font-weight: 600;
}

.portfolio-item {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* ─── Tech strip ─── */
.tech-strip-container {
  position: relative;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

@keyframes scrollLeft {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.tech-strip {
  display: flex;
  width: max-content;
  animation: scrollLeft 30s linear infinite;
}
.tech-strip:hover { animation-play-state: paused; }

.tech-item {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #94A3B8;
  white-space: nowrap;
  transition: color 0.2s ease;
  padding: 0.25rem 0.5rem;
}
.tech-item:hover { color: #7C3AED; }

.tech-sep {
  color: rgba(124,58,237,0.25);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   FORMULARIO — Tema Claro
═══════════════════════════════════════ */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  color: #0F172A;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  outline: none;
}

.form-input::placeholder { color: #94A3B8; }

.form-input:focus {
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
  background: #FFFFFF;
}

.form-input.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}

.form-input.success {
  border-color: #10B981;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25em;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-select option {
  background-color: #FFFFFF;
  color: #0F172A;
}

/* Custom checkbox */
.form-checkbox {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.25rem;
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  position: relative;
}
.form-checkbox:checked {
  background: var(--color-violet);
  border-color: var(--color-violet);
}
.form-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 1px; left: 4px;
  width: 5px; height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.form-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
}

.form-error {
  color: #DC2626;
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

/* ═══════════════════════════════════════
   SOCIAL LINKS
═══════════════════════════════════════ */
/* En sección contacto (fondo oscuro) */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  transition: all 0.2s ease;
}
.social-link:hover {
  background: rgba(124,58,237,0.2);
  border-color: rgba(124,58,237,0.5);
  color: #C4B5FD;
  transform: translateY(-2px);
}

/* En footer (fondo blanco) */
.social-link-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #94A3B8;
  transition: all 0.2s ease;
}
.social-link-sm:hover {
  background: rgba(124,58,237,0.1);
  border-color: rgba(124,58,237,0.3);
  color: #7C3AED;
  transform: translateY(-2px);
}

/* ─── Footer links ─── */
.footer-link {
  font-size: 0.875rem;
  color: #94A3B8;
  transition: color 0.2s ease;
}
.footer-link:hover { color: #7C3AED; }

/* ─── Hamburger ─── */
#mobile-menu-btn.open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#mobile-menu-btn.open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#mobile-menu-btn.open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── Focus visible ─── */
:focus-visible {
  outline: 2px solid rgba(124,58,237,0.6);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F8FAFC; }
::-webkit-scrollbar-thumb {
  background: rgba(124,58,237,0.3);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,0.55); }

/* ─── Stat counter ─── */
.stat-card { position: relative; }
.stat-card::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(124,58,237,0.2), transparent);
}
.stat-card:last-child::after { display: none; }

/* ─── Form animations ─── */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

#form-success:not(.hidden),
#form-error-msg:not(.hidden) {
  animation: slideDown 0.4s ease forwards;
}

/* ─── Mobile ─── */
@media (max-width: 640px) {
  #inicio h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .stat-card::after { display: none; }
}

/* ─── Print ─── */
@media print {
  #navbar, .shape-orb, .geo-shape { display: none; }
  body { background: white; color: black; }
}

/* ==========================================================================
   ESTILO DE FONDO GLOBAL
   ========================================================================== */
body {
  background-color: #F8FAFC;
  background-image: 
    radial-gradient(at 0% 0%, rgba(124, 58, 237, 0.06) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.06) 0px, transparent 50%),
    linear-gradient(rgba(226, 232, 240, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 232, 240, 0.5) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  background-attachment: fixed;
}