/* ui-polish.css v1.0 — MenteCodificadaIA (restaurado al diseño original limpio y funcional) */

/* ====== TOKENS ====== */
:root{
  --bg-900:#0a0f1e;
  --bg-800:#10182b;
  --surface-700:#1a2440;
  --surface-600:#1f2b4a;

  --text-100:#e8edff;
  --text-300:#bac6e6;

  --brand-300:#60a5fa;
  --brand-400:#3b82f6;
  --brand-500:#2563eb;
  --brand-600:#1d4ed8;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.30), 0 1px 1px rgba(0,0,0,.15);
  --shadow-md: 0 8px 20px rgba(3,7,18,.45);
  --shadow-lg: 0 16px 40px rgba(3,7,18,.60);

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;
  --space-9: 3rem;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --ease-out: cubic-bezier(.2,.8,.2,1);
  --t-fast: 160ms var(--ease-out);
  --t-mid: 260ms var(--ease-out);
  --t-slow: 360ms var(--ease-out);
}

html { color-scheme: dark; }

body {
  background: var(--bg-900) linear-gradient(180deg, rgba(37,99,235,.06), transparent 24rem) fixed;
  color: var(--text-100);
  font-family: "Inter","Poppins",system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial,sans-serif;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

section { padding-block: clamp(2.25rem, 4vw, 4rem); }
.container { width: min(1100px,92%); margin-inline: auto; }

h1,h2,h3 { 
  color: var(--text-100); 
  line-height: 1.15; 
  letter-spacing: -.01em; 
  text-wrap: balance; 
}
h1 { font-weight: 800; font-size: clamp(2.2rem, 1.2rem + 2.8vw, 3.4rem); margin: var(--space-8) 0 var(--space-4); }
h2 { font-weight: 700; font-size: clamp(1.6rem, 1rem + 1.6vw, 2.2rem); margin: var(--space-7) 0 var(--space-3); }
h3 { font-weight: 650; font-size: clamp(1.25rem, .95rem + .9vw, 1.5rem); margin: var(--space-6) 0 var(--space-3); }
p { color: var(--text-300); margin: 0 0 var(--space-4); }

/* ====== Enlaces ====== */
a:not(.btn):not(.cta) {
  color: var(--text-100);
  text-decoration: none;
  background: linear-gradient(currentColor,currentColor) 0 100%/0 2px no-repeat;
  transition: background-size var(--t-fast), color var(--t-fast);
  text-underline-offset: 3px;
}
a:not(.btn):not(.cta):hover {
  background-size: 100% 2px; color: #fff;
}

/* ====== Botones ====== */
button, .btn, .cta, a.btn, a.cta {
  --btn-bg: var(--brand-500);
  --btn-bg-hover: var(--brand-600);
  --btn-fg: #fff;

  display: inline-flex; align-items: center; justify-content: center;
  gap: .55rem;
  padding: .85rem 1.15rem;
  border: 0; border-radius: var(--radius-lg);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 650; letter-spacing: .01em;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
  cursor: pointer; text-decoration: none;
}
button:hover, .btn:hover, .cta:hover, a.btn:hover, a.cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: var(--btn-bg-hover);
}

/* ====== Tarjetas ====== */
.card {
  background: #111827;  /* color original restaurado */
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  transition: all 0.3s var(--ease-out);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.45);
  border-color: rgba(59,130,246,0.25);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

/* ====== CTA ====== */
.cta-block {
  display: block;
  margin: 2.5rem auto;
  max-width: 360px;
  text-align: center;
  font-size: 1.1rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  background: #111827;
  color: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.cta-block:hover {
  background: #1f2937;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.cta-block a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.cta-block a:hover { text-decoration: underline; }

/* ====== Animaciones ====== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====== Botón Secundario ====== */
.btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid #00bcd4;
  color: #00bcd4;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}
.btn-secondary:hover {
  background-color: #00bcd4;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0,188,212,0.3);
}

/* ====== Motion Reduce ====== */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
  html{ scroll-behavior: auto; }
}

/* Imagen más pequeña y proporcionada */
.img-small {
  display: block;
  margin: 2rem auto;
  width: 55%;              /* más estrecha */
  max-width: 720px;
  height: auto;
  max-height: 320px;       /* más corta */
  object-fit: cover;       /* recorta suavemente si sobra altura */
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

.img-small:hover {
  transform: scale(1.02);
}

/* ==== Animación suave de aparición para imágenes de servicios ==== */
.img-small {
  opacity: 0;
  animation: fadeInImage 1s ease forwards;
}

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

.services-grid a.card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.services-grid a.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.product-card {
  background: var(--card-bg, #0f1624);
  border-radius: 16px;
  padding: 2rem;
  text-align: left;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

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

.product-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.4rem;
}

.product-card p {
  color: #ccc;
  margin-bottom: 1.2rem;
}

.product-card .btn-primary {
  display: inline-block;
}
