/* ============================================================
   NICVEN TECH — Global Stylesheet
   Shared across: index, servicios/*, proyectos-realizados
   ============================================================ */

/* ── VARIABLES ── */
:root {
  --bg: #000543;
  --bg2: #000a6e;
  --violet: #4f46e5;
  --violet-light: #818cf8;
  --blue-mid: #2563eb;
  --blue-light: #60a5fa;
  --accent: #a78bfa;
  --white: #f8fafc;
  --white-dim: rgba(248,250,252,0.7);
  --white-faint: rgba(248,250,252,0.12);
  --glow: rgba(79,70,229,0.35);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: none;
}

/* ── CUSTOM CURSOR ── */
.cursor {
  position:fixed; width:12px; height:12px;
  background:var(--accent); border-radius:50%;
  pointer-events:none; z-index:9999;
  transform:translate(-50%,-50%);
  transition:width .2s, height .2s, background .2s;
  mix-blend-mode:screen;
}
.cursor-ring {
  position:fixed; width:36px; height:36px;
  border:1.5px solid var(--violet-light); border-radius:50%;
  pointer-events:none; z-index:9998;
  transform:translate(-50%,-50%);
  transition:all .12s ease;
  mix-blend-mode:screen;
}

/* ── CANVAS BG ── */
#bg-canvas { position:fixed; top:0; left:0; width:100%; height:100%; z-index:0; pointer-events:none; }

/* ── NAV ── */
nav {
  position:fixed; top:0; left:0; right:0; z-index:100;
  padding:1.2rem 5vw;
  display:flex; align-items:center; justify-content:space-between;
  backdrop-filter:blur(16px);
  background:rgba(0,5,67,0.55);
  border-bottom:1px solid rgba(79,70,229,0.18);
  transition:all .3s;
}
.nav-logo {
  font-family:var(--font-display); font-weight:800;
  font-size:1.3rem; letter-spacing:-.02em;
  text-decoration:none; color:var(--white);
}
.nav-logo span { color:var(--accent); }
.nav-links { display:flex; gap:2.5rem; align-items:center; cursor:none; }
.nav-links a {
  font-size:.88rem; font-weight:500; color:var(--white-dim);
  text-decoration:none; letter-spacing:.04em; transition:color .2s;
}
.nav-links a:hover, .nav-links a.active { color:var(--white); }

/* Dropdown */
.nav-dropdown { position:relative; }
.nav-dropdown-trigger {
  font-size:.88rem; font-weight:500; color:var(--white-dim); text-decoration:none;
  letter-spacing:.04em; transition:color .2s; cursor:none;
  display:flex; align-items:center; gap:.35rem;
  background:none; border:none; font-family:var(--font-body); padding:0;
}
.nav-dropdown-trigger:hover { color:var(--white); }
.dropdown-arrow {
  font-size:.65rem; transition:transform .25s cubic-bezier(.22,1,.36,1);
  display:inline-block; opacity:.7;
}
.nav-dropdown:hover .dropdown-arrow { transform:rotate(180deg); }
.nav-dropdown::after {
  content:""; position:absolute; left:0; right:0; top:100%; height:20px;
}
.dropdown-menu {
  position:absolute; top:calc(100% + 4px); left:50%;
  transform:translateX(-50%) translateY(-8px);
  opacity:0; pointer-events:none;
  transition:opacity .22s ease, transform .22s cubic-bezier(.22,1,.36,1);
  min-width:220px;
  background:rgba(0,5,67,0.92); backdrop-filter:blur(20px);
  border:1px solid rgba(79,70,229,0.3); border-radius:14px; padding:.6rem;
  box-shadow:0 24px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(79,70,229,.12);
}
.nav-dropdown:hover .dropdown-menu {
  opacity:1; pointer-events:all;
  transform:translateX(-50%) translateY(0);
}
.dropdown-item {
  display:flex; align-items:center; gap:.75rem;
  padding:.72rem 1rem; border-radius:10px;
  color:var(--white-dim); text-decoration:none; font-size:.86rem; font-weight:400;
  transition:background .18s, color .18s; position:relative;
}
.dropdown-item:hover { background:rgba(79,70,229,.18); color:var(--white); }
.dropdown-item-icon {
  width:30px; height:30px; border-radius:8px;
  background:rgba(79,70,229,.2); border:1px solid rgba(79,70,229,.3);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0; transition:background .18s;
}
.dropdown-item:hover .dropdown-item-icon { background:rgba(79,70,229,.4); }
.dropdown-item-icon svg { width:14px; height:14px; color:var(--accent); stroke:var(--accent); }
.dropdown-item-text { display:flex; flex-direction:column; gap:2px; }
.dropdown-item-label { font-weight:500; font-size:.86rem; line-height:1; }
.dropdown-item-sub { font-size:.74rem; color:rgba(248,250,252,.4); line-height:1; }
.dropdown-soon {
  font-size:.65rem; font-weight:600; letter-spacing:.06em;
  background:rgba(167,139,250,.15); color:var(--accent);
  border:1px solid rgba(167,139,250,.25); border-radius:100px;
  padding:.18rem .5rem; margin-left:auto; flex-shrink:0;
}
.dropdown-divider { height:1px; background:rgba(79,70,229,.15); margin:.4rem 0; }
.nav-cta {
  background:linear-gradient(135deg, var(--violet), var(--blue-mid));
  border:none; color:#fff; font-family:var(--font-body); font-weight:500;
  font-size:.85rem; padding:.55rem 1.3rem; border-radius:100px; cursor:none;
  letter-spacing:.02em; transition:opacity .2s, transform .15s;
  text-decoration:none; display:inline-block; white-space:nowrap;
}
.nav-cta:hover { opacity:.88; transform:translateY(-1px); }

/* ── MAIN WRAPPER ── */
main { position:relative; z-index:1; }

/* ── DIVIDER ── */
.divider {
  width:100%; height:1px;
  background:linear-gradient(90deg, transparent, var(--violet), transparent);
  margin:0; opacity:.35;
}

/* ── SECTIONS ── */
section { padding:5rem 5vw; position:relative; }
.section-label {
  font-size:.78rem; font-weight:500; letter-spacing:.2em;
  text-transform:uppercase; color:var(--accent); margin-bottom:.8rem;
}
.section-title {
  font-family:var(--font-display); font-weight:700;
  font-size:clamp(1.8rem,3.5vw,2.8rem); letter-spacing:-.025em;
  line-height:1.15; max-width:620px;
}
.section-title .hi { color:var(--violet-light); }
.section-sub {
  color:var(--white-dim); font-weight:300; font-size:1rem;
  max-width:520px; line-height:1.7; margin-top:.75rem;
}

/* ── PAGE HERO (service sub-pages) ── */
.page-hero { padding:10rem 5vw 5rem; text-align:center; position:relative; }
.breadcrumb {
  display:flex; align-items:center; justify-content:center; gap:.5rem;
  font-size:.78rem; color:var(--white-dim); margin-bottom:1.5rem;
  opacity:0; animation:fadeUp .6s .1s forwards;
}
.breadcrumb a { color:var(--accent); text-decoration:none; }
.breadcrumb a:hover { text-decoration:underline; }
.breadcrumb-sep { opacity:.4; }
.page-eyebrow {
  font-size:.82rem; font-weight:500; letter-spacing:.18em; color:var(--accent);
  text-transform:uppercase; margin-bottom:1.2rem;
  opacity:0; animation:fadeUp .7s .2s forwards;
}
.page-title {
  font-family:var(--font-display); font-weight:800;
  font-size:clamp(2.2rem,5vw,4rem);
  line-height:1.08; letter-spacing:-.03em; max-width:800px; margin:0 auto 1.5rem;
  opacity:0; animation:fadeUp .8s .35s forwards;
}
.page-title .hi {
  background:linear-gradient(90deg, var(--blue-light), var(--accent));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.page-sub {
  font-size:1.05rem; color:var(--white-dim); max-width:560px; margin:0 auto 2.5rem;
  line-height:1.72; font-weight:300;
  opacity:0; animation:fadeUp .8s .5s forwards;
}
.page-cta-row {
  display:flex; gap:1rem; flex-wrap:wrap; justify-content:center;
  opacity:0; animation:fadeUp .8s .65s forwards;
}

/* ── SERVICE CARDS ── */
.services-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(290px,1fr));
  gap:1.5rem; margin-top:3.5rem;
}
.service-card {
  background:rgba(255,255,255,.04); border:1px solid rgba(79,70,229,.22);
  border-radius:20px; padding:2.2rem; position:relative; overflow:hidden;
  transition:transform .28s cubic-bezier(.22,1,.36,1), border-color .28s, box-shadow .28s;
  cursor:none; display:flex; flex-direction:column;
}
.service-card::before {
  content:''; position:absolute; inset:0; border-radius:20px;
  background:radial-gradient(circle at 50% 0%, rgba(79,70,229,.18) 0%, transparent 65%);
  opacity:0; transition:opacity .3s; pointer-events:none;
}
.service-card:hover { transform:translateY(-8px); border-color:var(--violet); box-shadow:0 16px 60px rgba(79,70,229,.28), 0 0 0 1px rgba(79,70,229,.35); }
.service-card:hover::before { opacity:1; }
.card-icon {
  width:48px; height:48px; color:var(--accent);
  display:block; margin:0 auto 1.3rem auto; stroke-width:1.8;
  transition:transform .25s ease, color .25s ease;
}
.service-card:hover .card-icon { transform:translateY(-2px) scale(1.05); color:var(--blue-light); }
.card-price {
  font-family:var(--font-display); font-size:2rem; font-weight:700;
  background:linear-gradient(90deg, var(--blue-light), var(--accent));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
  margin-bottom:.3rem;
}
.card-title {
  text-align:center; font-family:var(--font-display);
  font-size:1.3rem; font-weight:700; margin-bottom:1rem;
}
.card-tagline { font-size:.88rem; color:var(--white-dim); margin-bottom:1.3rem; line-height:1.55; font-weight:300; }
.card-features { list-style:none; display:flex; flex-direction:column; gap:.45rem; margin-bottom:1.5rem; flex:1; }
.card-features li { font-size:.84rem; color:var(--white-dim); display:flex; align-items:flex-start; gap:.5rem; }
.card-features li::before { content:'→'; color:var(--accent); flex-shrink:0; }
.card-badges { display:flex; flex-wrap:wrap; gap:.4rem; }
.card-badge {
  display:inline-block; font-size:.72rem; font-weight:500; letter-spacing:.06em;
  background:rgba(167,139,250,.15); color:var(--accent);
  border:1px solid rgba(167,139,250,.3); border-radius:100px; padding:.3rem .8rem;
}
.card-featured { border-color:rgba(96,165,250,.4); }
.card-featured::after {
  content:'★ POPULAR'; position:absolute; top:1.3rem; right:1.3rem;
  font-size:.65rem; font-weight:700; letter-spacing:.1em;
  background:linear-gradient(135deg,var(--violet),var(--blue-mid));
  color:#fff; padding:.25rem .7rem; border-radius:100px;
}
.badge-launch {
  display:inline-flex; align-items:center; gap:7px;
  background:rgba(79,70,229,.18); color:#c4b5fd;
  border:1px solid rgba(167,139,250,.35); border-radius:999px;
  padding:.35rem 1rem; backdrop-filter:blur(8px);
  width:fit-content; align-self:flex-start;
}
.badge-pct {
  background:linear-gradient(135deg,#4f46e5,#7c3aed); color:white;
  border-radius:999px; padding:.18rem .55rem;
  font-size:.68rem; font-weight:800;
}
.price-row { display:flex; flex-direction:column; align-items:center; gap:4px; margin-bottom:1.4rem; }
.price-old {
  font-size:1.05rem; font-weight:500; color:rgba(248,250,252,.38);
  text-decoration:line-through; text-decoration-color:rgba(248,250,252,.45);
}
.card-cta {
  display:block; text-align:center; margin-top:1.4rem;
  background:linear-gradient(135deg,var(--violet),var(--blue-mid));
  color:#fff; font-family:var(--font-body); font-weight:500; font-size:.88rem;
  padding:.7rem 1.2rem; border-radius:100px; text-decoration:none;
  transition:opacity .2s, transform .15s; box-shadow:0 0 20px rgba(79,70,229,.3);
}
.card-cta:hover { opacity:.88; transform:translateY(-2px); }

/* ── BUTTONS ── */
.btn-primary {
  display:inline-flex; align-items:center; gap:.5rem;
  background:linear-gradient(135deg,#25d366 0%,#128c5e 100%);
  color:#fff; font-family:var(--font-body); font-weight:500; font-size:.95rem;
  padding:.85rem 2rem; border-radius:100px; border:none; cursor:none;
  box-shadow:0 0 28px rgba(37,211,102,.35);
  transition:transform .18s, box-shadow .18s; text-decoration:none;
}
.btn-primary:hover { transform:translateY(-3px); box-shadow:0 0 44px rgba(37,211,102,.55); }
.btn-ghost {
  display:inline-flex; align-items:center; gap:.5rem;
  background:transparent; color:var(--white);
  font-family:var(--font-body); font-weight:500; font-size:.95rem;
  padding:.85rem 2rem; border-radius:100px;
  border:1.5px solid rgba(255,255,255,.22); cursor:none;
  transition:border-color .2s, background .2s; text-decoration:none;
}
.btn-ghost:hover { border-color:var(--accent); background:rgba(167,139,250,.08); }
.btn-violet {
  display:inline-flex; align-items:center; gap:.5rem;
  background:linear-gradient(135deg,var(--violet),var(--blue-mid));
  color:#fff; font-family:var(--font-body); font-weight:500; font-size:.95rem;
  padding:.85rem 2rem; border-radius:100px; border:none; cursor:none;
  box-shadow:0 0 24px rgba(79,70,229,.4);
  transition:opacity .2s, transform .15s; text-decoration:none;
}
.btn-violet:hover { opacity:.88; transform:translateY(-2px); }

/* ── FOOTER ── */
footer {
  padding:2.5rem 5vw; border-top:1px solid rgba(79,70,229,.18);
  display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:1rem; position:relative; z-index:1;
}
.footer-logo { font-family:var(--font-display); font-weight:800; font-size:1.1rem; text-decoration:none; color:var(--white); }
.footer-logo span { color:var(--accent); }
.footer-copy { font-size:.8rem; color:var(--white-dim); }
.footer-links { display:flex; gap:1.5rem; flex-wrap:wrap; }
.footer-links a { font-size:.8rem; color:var(--white-dim); text-decoration:none; transition:color .2s; }
.footer-links a:hover { color:var(--accent); }

/* ── SCROLL REVEAL ── */
.reveal { opacity:0; transform:translateY(32px); transition:opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.reveal.visible { opacity:1; transform:translateY(0); }
.reveal-delay-1 { transition-delay:.1s; }
.reveal-delay-2 { transition-delay:.2s; }
.reveal-delay-3 { transition-delay:.3s; }
.reveal-delay-4 { transition-delay:.4s; }
.reveal-delay-5 { transition-delay:.5s; }

/* ── KEYFRAMES ── */
@keyframes fadeUp { from { opacity:0; transform:translateY(22px); } to { opacity:1; transform:translateY(0); } }

/* ============================================================
   RESPONSIVE — Mobile (≤ 768px)
   ============================================================ */

/* Nav: hide links, keep logo + CTA tight */
@media (max-width:768px) {
  nav { padding:.9rem 4vw; }
  .nav-links { display:none; }
  .nav-cta { font-size:.8rem; padding:.48rem 1rem; }
}

/* Section padding reduction */
@media (max-width:768px) {
  section { padding:3.5rem 5vw; }
  .page-hero { padding:7rem 5vw 3.5rem; }
}

/* Service card grid: always 1 column below 640px */
@media (max-width:640px) {
  .services-grid { grid-template-columns:1fr; }
}

/* Page-hero title on small phones */
@media (max-width:480px) {
  .page-title { font-size:clamp(1.9rem,8vw,2.8rem); }
  .page-sub { font-size:.95rem; }
  .page-cta-row { flex-direction:column; align-items:stretch; }
  .page-cta-row .btn-primary,
  .page-cta-row .btn-ghost { justify-content:center; }
}

/* Footer: stack vertically on small screens */
@media (max-width:560px) {
  footer { flex-direction:column; align-items:center; text-align:center; gap:.8rem; }
  .footer-links { justify-content:center; }
}

/* Buttons: allow wrapping on very small screens */
@media (max-width:400px) {
  .btn-primary, .btn-ghost, .btn-violet { font-size:.88rem; padding:.75rem 1.4rem; }
}
