/* ============ Variables de marca ============ */
:root{
  --primary:#0891b2; --secondary:#a16207; --accent:#10b981;
  --dark:#0f172a; --light:#f8fafc; --gray:#64748b;
  --gradient-hero:linear-gradient(135deg,#0891b2 0%,#0e7490 50%,#0c4a6e 100%);
  --space-xs:.5rem; --space-sm:1rem; --space-md:2rem; --space-lg:4rem; --space-xl:8rem;
  --font-display: "Playfair Display", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
}
/* Preferencias de usuario */
@media (prefers-reduced-motion: reduce){
  *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
/* Reset mínimo + tipografía */
html{scroll-behavior:smooth} body{margin:0;background:var(--light);color:var(--dark);font-family:var(--font-body);-webkit-font-smoothing:antialiased;}

/* ============ HERO ============ */
.hero{min-height:100vh;background:var(--gradient-hero);position:relative;overflow:hidden}
.hero::before{content:'';position:absolute;inset:0;opacity:.05;background:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"><path fill="%23fff" fill-opacity=".35" d="M0 0h80v2H0zM0 40h80v2H0zM0 80h80v2H0zM80 0h2v80h-2z"/></svg>')}
.hero-content{position:relative;z-index:2;padding:var(--space-xl) var(--space-md);display:flex;flex-direction:column;justify-content:center;min-height:100vh;max-width:1200px;margin:0 auto}
.hero-title{font-family:var(--font-display);font-size:clamp(2.5rem,8vw,5rem);color:var(--light);line-height:1.1;margin:0 0 var(--space-md);animation:fadeInUp .8s ease-out}
.text-gradient{background:linear-gradient(90deg,#fff, #c7f9ff);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero-subtitle{font-size:clamp(1.1rem,3vw,1.6rem);color:rgba(248,250,252,.9);margin:0 0 var(--space-lg);animation:fadeInUp .8s ease-out .2s backwards}
.hero-actions{display:flex;gap:var(--space-sm);flex-wrap:wrap}

.btn-premium{display:inline-flex;align-items:center;gap:var(--space-sm);padding:1.1rem 2rem;background:var(--light);color:var(--primary);font-weight:600;border-radius:.75rem;text-decoration:none;transition:all .3s cubic-bezier(.4,0,.2,1);animation:fadeInUp .8s ease-out .4s backwards;box-shadow:0 10px 40px rgba(0,0,0,.2)}
.btn-premium:hover{transform:translateY(-2px);box-shadow:0 20px 60px rgba(0,0,0,.3);background:var(--accent);color:#fff}
.btn-secondary{display:inline-flex;align-items:center;gap:.5rem;padding:1rem 1.25rem;border:1.5px solid rgba(255,255,255,.6);color:#fff;text-decoration:none;border-radius:.75rem;backdrop-filter:saturate(160%) blur(6px);transition:all .25s}
.btn-secondary:hover{transform:translateY(-2px);border-color:#fff}

.hero-stats{display:flex;gap:var(--space-lg);flex-wrap:wrap;margin-top:var(--space-md)}
.stat{display:flex;flex-direction:column}
.stat-number{font-size:clamp(1.5rem,5vw,2.25rem);font-weight:800;color:#fff}
.stat-label{color:rgba(255,255,255,.85);font-size:.95rem}

/* ============ Services ============ */
.services{background:#fff;padding:var(--space-xl) var(--space-md)}
.container{max-width:1200px;margin:0 auto}
.section-title{font-family:var(--font-display);font-size:clamp(1.8rem,4vw,2.5rem);margin:0 0 var(--space-lg);color:var(--dark)}
.services-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:var(--space-md)}
.service-card{background:#fff;border-radius:1.25rem;padding:var(--space-lg);position:relative;transition:all .3s ease;transform-style:preserve-3d;box-shadow:0 10px 30px rgba(0,0,0,.06)}
.service-card:hover{transform:translateY(-6px) rotateX(3deg);box-shadow:0 20px 60px rgba(0,0,0,.12)}
.service-icon{width:70px;height:70px;background:var(--gradient-hero);border-radius:1rem;display:flex;align-items:center;justify-content:center;margin-bottom:var(--space-md);font-size:1.75rem;color:#fff}

/* ============ Portfolio ============ */
.portfolio{background:linear-gradient(180deg,#f8fafc, #fff)}
.portfolio-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:var(--space-md);padding:var(--space-lg) 0}
.portfolio-item{position:relative;border-radius:1.25rem;overflow:hidden;aspect-ratio:4/3;cursor:pointer;transform:scale(1);transition:all .35s cubic-bezier(.4,0,.2,1)}
.portfolio-item img{width:100%;height:100%;object-fit:cover;display:block}
.portfolio-item:hover{transform:scale(1.04);box-shadow:0 24px 70px rgba(0,0,0,.18)}
.portfolio-overlay{position:absolute;inset:0;background:linear-gradient(180deg,transparent 0%, rgba(15,23,42,.9) 100%);opacity:0;transition:opacity .25s ease;display:flex;flex-direction:column;justify-content:flex-end;padding:var(--space-md);color:#fff}
.portfolio-item:hover .portfolio-overlay{opacity:1}
.portfolio-category{opacity:.85;font-size:.9rem}

/* ============ Proceso (timeline) ============ */
.process{background:#fff;padding:var(--space-xl) var(--space-md)}
.process-timeline{position:relative}
.timeline-line{position:absolute;left:50%;top:0;bottom:0;width:2px;background:var(--gradient-hero);transform:translateX(-50%)}
.timeline-item{display:flex;align-items:center;margin-bottom:var(--space-xl);position:relative}
.timeline-item:nth-child(even){flex-direction:row-reverse}
.timeline-content{flex:1;padding:var(--space-lg);background:#fff;border-radius:1.25rem;box-shadow:0 10px 40px rgba(0,0,0,.08);margin:0 var(--space-lg);transition:all .3s ease}
.timeline-content:hover{transform:scale(1.02);box-shadow:0 20px 60px rgba(0,0,0,.14)}
.timeline-dot{width:38px;height:38px;background:var(--accent);border-radius:50%;position:absolute;left:50%;transform:translateX(-50%);border:6px solid #fff;box-shadow:0 5px 20px rgba(16,185,129,.35)}

/* ============ Form Moderno ============ */
.form-modern{background:#fff;border-radius:1.4rem;padding:var(--space-lg);box-shadow:0 20px 60px rgba(0,0,0,.08)}
.form-group{margin-bottom:var(--space-md)}
.form-label{display:block;margin-bottom:.5rem;font-weight:600;color:var(--dark);font-size:.9rem;text-transform:uppercase;letter-spacing:.05em}
.form-input{width:100%;padding:1.1rem;border:2px solid #e2e8f0;border-radius:.75rem;font-size:1rem;transition:all .2s;background:#f8fafc}
.form-input:focus{outline:0;border-color:var(--primary);background:#fff;transform:translateY(-2px);box-shadow:0 10px 30px rgba(8,145,178,.08)}
.form-input.error{border-color:#ef4444} .form-input.valid{border-color:#10b981}

/* CTA final + Footer */
.cta-final{background:var(--dark);color:#fff;padding:var(--space-xl) var(--space-md);text-align:center}
.btn-large{padding:1.2rem 2rem;font-size:1.05rem}
.footer{background:var(--dark);color:var(--light);padding:var(--space-xl) 0;position:relative;overflow:hidden}
.footer::before{content:'';position:absolute;left:0;right:0;top:0;height:1px;background:var(--gradient-hero)}

/* Animaciones */
@keyframes fadeInUp{from{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}

/* Responsive */
@media (max-width:768px){
  .timeline-line{display:none}
  .timeline-item{flex-direction:column!important}
  .timeline-dot{position:static;transform:none;margin:var(--space-md) auto}
}

/* =================== Micro-animaciones =================== */
/* Ripple en botón premium */
.btn-premium{ position:relative; overflow:hidden; }
.btn-premium::after{
  content:'';
  position:absolute; inset:0; border-radius:inherit;
  background: radial-gradient(circle, rgba(255,255,255,.5) 0%, transparent 70%);
  transform: scale(0); opacity:0; transition: transform .6s, opacity .6s;
}
.btn-premium:active::after{ transform: scale(4); opacity: 0; transition: 0s; }

/* Hover "magnético" en service-card (requiere JS para coords) */
.service-card{ --mouse-x:50%; --mouse-y:50%; isolation:isolate; }
.service-card::before{
  content:''; position:absolute; inset:-1px; border-radius:inherit; z-index:-1;
  background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), var(--primary) 0%, transparent 50%);
  opacity:0; transition: opacity .25s;
}
.service-card:hover::before{ opacity:.10; }

/* =================== Testimonios =================== */
.testimonials{ 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color:#fff; padding: var(--space-xl) var(--space-md);
}
.testimonials .section-title{ color:#fff; text-align:center; }
.testimonials-slider{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap: var(--space-md); margin-top: var(--space-md);
}
.testimonial-card{
  background: rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(10px); border-radius: 1rem; padding: var(--space-lg);
  max-width: 720px; margin: 0 auto;
}
.stars{ letter-spacing:.15rem; margin-bottom:.5rem; }
.testimonial-author{ display:flex; align-items:center; gap:1rem; margin-top: var(--space-md); }
.testimonial-author img{ width:48px; height:48px; border-radius:50%; border:2px solid rgba(255,255,255,.3); }

/* =================== Calculadora de espacio =================== */
.space-calculator{
  background:#fff; border-radius:1.25rem; padding: var(--space-lg);
  box-shadow: 0 14px 48px rgba(0,0,0,.08);
}
.calc-grid{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap: var(--space-md);
}
.calc-grid .form-group{ margin:0; }
.result{
  margin-top: var(--space-md); display:grid; gap:.75rem;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
}
.result-item{
  background:#f8fafc; border:1px solid #e2e8f0; border-radius:.75rem; padding: .9rem 1rem;
  display:flex; justify-content:space-between; align-items:center;
}
.result-item .label{ color:var(--gray); font-size:.95rem; }
.result-item .value{ font-weight:700; color: var(--dark); }

/* Respeta preferencias del usuario (reduce motion) */
@media (prefers-reduced-motion: reduce){
  .btn-premium::after, .service-card::before{ transition:none!important }
}
