/* =========================================================
   APPTIVATE · PREMIUM LINEAR FUTURE UI · SOLO CSS
   ========================================================= */

/* ---------------- RESET ---------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-main: #020617;
  --bg-soft: #0f172a;
  --card-bg: rgba(15, 23, 42, 0.85);
  --border-soft: rgba(56, 189, 248, 0.15);
  --glow: rgba(56, 189, 248, 0.4);

  --primary: #38bdf8;
  --primary-soft: #22d3ee;
  --text-main: #e5e7eb;
  --text-soft: #94a3b8;
}

/* ---------------- BODY ---------------- */
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: radial-gradient(circle at top, #0f172a, #020617 70%);
  color: var(--text-main);
  line-height: 1.65;
  text-align: center;
  padding: 20px;
  overflow-x: hidden;
}

/* ---------------- HERO ---------------- */
.hero {
  background: linear-gradient(160deg, rgba(15,23,42,0.96), rgba(2,6,23,0.96));
  padding: clamp(70px, 10vw, 120px) 20px;
  border-radius: 28px;
  margin: 40px auto 100px;
  max-width: 1200px;
  box-shadow:
    0 0 80px var(--glow),
    inset 0 0 40px rgba(255,255,255,0.04);
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: radial-gradient(circle at top, rgba(56,189,248,0.12), transparent 70%);
  pointer-events: none;
}

.hero .logo {
  max-width: 220px;
  margin-bottom: 30px;
  filter: drop-shadow(0 0 20px rgba(56,189,248,0.35));
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  background: linear-gradient(90deg, #38bdf8, #22d3ee, #38bdf8);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientMove 6s ease infinite;
  margin-bottom: 18px;
}

.hero .sub {
  font-size: 1.15em;
  color: var(--text-soft);
  margin-bottom: 46px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------- BOTONES ---------------- */
.botones {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}

.btn {
  padding: 15px 34px;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  border: none;
  color: #020617;
  font-weight: 800;
  border-radius: 14px;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: all 0.25s ease;
  box-shadow: 0 12px 40px var(--glow);
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 70px rgba(56,189,248,0.6);
}

.btn-secundario {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  box-shadow: none;
}

.btn-secundario:hover {
  background: rgba(56,189,248,0.12);
}

/* ---------------- SECCIONES ---------------- */
section {
  margin: 110px auto;
  max-width: 1200px;
  position: relative;
}

h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 60px;
  color: var(--primary);
}

/* ---------------- GRIDS ---------------- */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 34px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ---------------- TARJETAS ---------------- */
.caja {
  background: linear-gradient(180deg, rgba(30,41,59,0.92), rgba(2,6,23,0.92));
  padding: 32px 26px;
  border-radius: 26px;
  border: 1px solid var(--border-soft);
  box-shadow:
    0 0 30px rgba(0,0,0,0.45),
    inset 0 0 20px rgba(255,255,255,0.03);
  transition: all 0.35s ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.caja::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(56,189,248,0.15), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.caja:hover::before {
  opacity: 1;
}

.caja:hover {
  transform: translateY(-8px) scale(1.025);
  box-shadow: 0 0 90px rgba(56,189,248,0.4);
}

.destacado {
  border: 2px solid var(--primary);
  box-shadow: 0 0 80px rgba(56,189,248,0.55);
}

/* ---------------- FORMULARIOS ---------------- */
form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: linear-gradient(180deg, rgba(30,41,59,0.95), rgba(2,6,23,0.95));
  padding: 46px 26px;
  border-radius: 28px;
  box-shadow:
    0 0 60px rgba(56,189,248,0.2),
    inset 0 0 30px rgba(255,255,255,0.05);
}

form input,
form textarea {
  width: 100%;
  max-width: 540px;
  padding: 15px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: #020617;
  color: var(--text-main);
  font-size: 1em;
}

form input::placeholder,
form textarea::placeholder {
  color: #64748b;
}

form button {
  margin-top: 10px;
  padding: 15px 38px;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  border: none;
  color: #020617;
  font-weight: 800;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 12px 40px var(--glow);
  transition: all 0.25s ease;
}

form button:hover {
  box-shadow: 0 18px 65px rgba(56,189,248,0.6);
}

/* ---------------- FOOTER ---------------- */
footer {
  margin-top: 110px;
  font-size: 0.9em;
  color: var(--text-soft);
}

/* ---------------- ANIMACIONES ---------------- */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.caja {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 0.8s ease forwards;
}

/* =========================================================
   FIX DEFINITIVO: ACTIVAR CLIC EN ENLACES DE PROYECTOS
   (solo CSS, sin tocar funciones)
   ========================================================= */

/* Garantiza que las cajas sean clicables */
.proyectos .caja {
  position: relative;
  z-index: 10;
  pointer-events: auto !important;
}

/* Garantiza que los enlaces dentro funcionen */
.proyectos .caja a {
  position: relative;
  z-index: 20;
  pointer-events: auto !important;
}

/* Elimina cualquier pseudo-capa que bloquee el clic */
.proyectos .caja::before,
.proyectos .caja::after {
  }pointer-events: none !important;
}

/* ================================
   HALO POTENCIADO BOTÓN SECUNDARIO
   ================================ */

.btn-secundario {
  position: relative;
  box-shadow:
    0 0 25px rgba(56,189,248,0.35),
    0 0 50px rgba(56,189,248,0.25),
    inset 0 0 15px rgba(56,189,248,0.15);
}

.btn-secundario::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 18px;
  box-shadow: 0 0 40px rgba(56,189,248,0.55);
  opacity: 0.7;
  pointer-events: none;
}

.btn-secundario:hover {
  box-shadow:
    0 0 40px rgba(56,189,248,0.6),
    0 0 90px rgba(56,189,248,0.45);
}

