:root {
  --bg: #120608;
  --bg-soft: #1a0b0e;
  --card: rgba(255, 255, 255, 0.09);
  --card-strong: rgba(255, 255, 255, 0.13);
  --line: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --muted: #d7c9c9;
  --red: #ff213f;
  --red-dark: #b00018;
  --red-soft: #ff7786;
  --shadow: 0 30px 90px rgba(255, 33, 63, 0.24);
}

/* ========================== BASE ========================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { width: 100%; max-width: 100%; overflow-x: hidden; }

body {
  position: relative;
  isolation: isolate;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 72% 18%, rgba(255,33,63,0.24), transparent 32%),
    radial-gradient(circle at 25% 82%, rgba(255,119,134,0.16), transparent 34%),
    linear-gradient(135deg, #17090c, #2a0d13 50%, #120608);
  margin: 0;
  padding: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(18,6,8,0.66), rgba(18,6,8,0.82)),
    url("assets/tech-background.svg");
  background-size: cover, cover;
  background-position: center, center top;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(#000, transparent 82%);
}

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-pad { padding: 100px 0; }

/* ========================== NAVBAR ========================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: rgba(22,7,10,0.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
  min-width: 0;
}

.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.logo span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: #f0e7e7;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--red); }

.nav-cta {
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff !important;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 6px 0;
  background: #fff;
  border-radius: 20px;
  transition: 0.3s;
}

/* ========================== HERO ========================== */

.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
  padding: 60px 0 100px;
}

.eyebrow,
.mini-label,
.section-title span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255,33,63,0.68);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,33,63,0.14);
  box-shadow: 0 0 25px rgba(255,33,63,0.2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  font-weight: 800;
}

h1 {
  margin: 24px 0 20px;
  font-size: clamp(40px, 6vw, 82px);
  line-height: 1.06;
}

h1 span,
.section-title h2 span {
  color: transparent;
  background: linear-gradient(100deg, #fff, var(--red-soft), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy p,
.section-title p,
.contact-grid p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.3s ease;
  white-space: nowrap;
  background: none;
}

.btn:hover { transform: translateY(-3px); }

.primary {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: var(--shadow);
}

.secondary { background: rgba(255,255,255,0.08); }

/* Hero visual */
.hero-visual {
  position: relative;
  min-height: 580px;
}

.laptop-wrap {
  position: absolute;
  inset: 60px 0 0 0;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5));
}

.stats-card {
  position: absolute;
  z-index: 3;
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,0.15), rgba(255,255,255,0.06));
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: float 5s ease-in-out infinite;
}

.stats-card span { color: var(--red); font-size: 24px; }
.stats-card p { margin: 6px 0; color: #fff; font-size: 14px; }
.stats-card h3 { font-size: 36px; margin: 0; }
.stats-card h4 { margin: 6px 0 4px; font-size: 14px; }
.stats-card small { color: var(--muted); font-size: 12px; }

.card-one { left: 60px; top: 0; }
.card-two { right: 0; top: 30px; }
.card-three { left: 0; bottom: 80px; }

/* Bottom strip */
.bottom-strip {
  width: 100%;
  padding: 16px 24px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.12);
  background: rgba(34,10,14,0.7);
  backdrop-filter: blur(15px);
}

.bottom-strip p {
  margin: 0 0 12px;
  color: #ffc2c8;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 12px;
  font-weight: 800;
}

.bottom-strip div {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px 40px;
  flex-wrap: wrap;
  color: #f0e7e7;
  font-size: 14px;
}

/* ========================== SECTIONS ========================== */

.section-title {
  margin-bottom: 52px;
  text-align: center;
}

.section-title h2,
.contact-grid h2 {
  margin: 16px 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.1;
}

.section-title p { margin: 0 auto; }

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card,
.price-card,
.step,
.project-card,
.contact-form {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover,
.price-card:hover,
.step:hover,
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,33,63,0.5);
}

.service-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(255,33,63,0.34);
  border-radius: 16px;
  background: rgba(255,33,63,0.14);
  font-size: 24px;
}

.service-card h3,
.step h3,
.project-card h3,
.price-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.service-card p,
.step p,
.project-card p,
.price-card p,
.price-card li {
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

/* Work */
.showcase {
  background: linear-gradient(180deg, transparent, rgba(255,33,63,0.08), transparent);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card { overflow: hidden; padding: 16px; }

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.1);
}

.project-card a {
  display: inline-block;
  margin-top: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
}

/* Process */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.step b { color: var(--red); font-size: 30px; display: block; margin-bottom: 10px; }

/* Pricing */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.price-card { position: relative; }

.price-card h2 { margin: 16px 0; font-size: 40px; }

.price-card ul { margin: 20px 0; list-style: none; padding: 0; }

.price-card li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.popular {
  border-color: rgba(255,33,63,0.58);
  box-shadow: var(--shadow);
}

.badge {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--red);
  font-size: 11px;
  font-weight: 800;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.contact-form { display: grid; gap: 14px; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px 17px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  color: #fff;
  background: rgba(0,0,0,0.22);
  font-family: inherit;
  font-size: 15px;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--red); }

.form-msg { color: #ffc2c8 !important; font-size: 14px; margin: 0; }

/* ========================== CURSOR GLOW ========================== */

.cursor-glow {
  position: fixed;
  z-index: 0;
  left: 0;
  top: 0;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255,33,63,0.13);
  filter: blur(55px);
  pointer-events: none;
  transform: translate3d(0,0,0) translate(-50%,-50%);
  will-change: transform;
}

/* ========================== FOOTER ========================== */

.footer {
  padding: 64px 0 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(20,6,9,0.9);
}

.footer a {
  color: #d7c9c9;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr 1fr;
  gap: 32px;
  color: var(--muted);
}

.footer-brand p,
.footer-col p {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.footer-col { display: grid; align-content: start; gap: 10px; }

.footer-col h4 { color: #fff; font-size: 15px; margin: 0 0 6px; }

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-links a {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,33,63,0.85);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  box-shadow: 0 12px 30px rgba(255,33,63,0.35);
  font-weight: 900;
  font-size: 14px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  transform: translateY(-4px) scale(1.04);
  border-color: #fff;
  box-shadow: 0 18px 42px rgba(255,33,63,0.5);
  outline: none;
}

.social-links svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.3));
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 13px;
}

/* ========================== REVEAL ========================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: 0.9s ease;
  will-change: opacity, transform;
}

.reveal.show {
  opacity: 1;
  transform: none;
  will-change: auto;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ==========================
   TABLET — max 1024px
========================== */
@media (max-width: 1024px) {
  .hero-grid { gap: 36px; }
  .card-one { left: 30px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ==========================
   TABLET — max 900px
========================== */
@media (max-width: 900px) {
  .menu-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: 72px;
    right: 0;
    width: min(320px, 85vw);
    height: calc(100vh - 72px);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 28px;
    background: #19070b;
    transition: transform 0.35s ease;
    overflow-y: auto;
    transform: translateX(100%);
    gap: 20px;
    z-index: 998;
    margin: 0;
  }

  .nav-links.open { transform: translateX(0); }

  .nav-links a { font-size: 16px; }

  .nav-cta { width: 100%; text-align: center; padding: 14px 18px; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 0 80px;
  }

  .hero-visual {
    order: -1;
    min-height: 420px;
  }

  .hero-copy { text-align: center; }
  .hero-copy p { margin: 0 auto; }
  .hero-actions { justify-content: center; }

  .contact-grid { grid-template-columns: 1fr; gap: 36px; }

  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: repeat(2, 1fr); }

  .card-one { left: 16px; top: 0; }
  .card-two { right: 8px; top: 24px; }
  .card-three { left: 8px; bottom: 20px; }
}

/* ==========================
   MOBILE — max 640px
========================== */
@media (max-width: 640px) {
  .container { padding: 0 16px; }

  .section-pad { padding: 64px 0; }

  .cursor-glow { display: none; }

  /* Navbar */
  .navbar { height: 64px; }
  .nav-links { top: 64px; height: calc(100vh - 64px); }
  .logo-img { width: 38px; height: 38px; }
  .logo { font-size: 16px; gap: 8px; }

  /* Hero */
  .hero { padding-top: 64px; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 36px 0 64px;
  }

  .hero-visual {
    min-height: auto;
    order: -1;
  }

  .stats-card { display: none; }

  .laptop-wrap {
    position: relative;
    inset: auto;
    width: 100%;
    margin: 0 auto;
  }

  h1 { font-size: clamp(34px, 10vw, 52px); margin: 18px 0 16px; }

  .hero-copy p,
  .section-title p,
  .contact-grid p { font-size: 15px; }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
    padding: 0 16px;
  }

  .btn { width: 100%; padding: 0 16px; min-height: 50px; font-size: 14px; }

  /* Bottom strip hidden on mobile */
  .bottom-strip { display: none; }

  /* Sections */
  .section-title { margin-bottom: 36px; }

  .service-grid,
  .work-grid,
  .price-grid,
  .steps { grid-template-columns: 1fr; gap: 14px; }

  .service-card,
  .price-card,
  .step,
  .contact-form { padding: 22px; border-radius: 20px; }

  .project-card { padding: 14px; border-radius: 20px; }
  .project-card img { height: 180px; border-radius: 14px; }

  .service-icon { width: 48px; height: 48px; font-size: 20px; margin-bottom: 14px; }

  .service-card h3,
  .step h3,
  .project-card h3,
  .price-card h3 { font-size: 18px; }

  .price-card h2 { font-size: 36px; }

  .badge { position: static; display: inline-block; margin-bottom: 12px; }

  .contact-grid { grid-template-columns: 1fr; gap: 28px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }
  .footer { padding: 48px 0 24px; }
}

/* ==========================
   MOBILE SMALL — max 400px
========================== */
@media (max-width: 400px) {
  .container { padding: 0 14px; }

  h1 { font-size: clamp(30px, 11vw, 40px); }

  .eyebrow,
  .mini-label,
  .section-title span {
    font-size: 10px;
    padding: 8px 12px;
    letter-spacing: 0.08em;
  }

  .section-title h2,
  .contact-grid h2 { font-size: clamp(26px, 9vw, 36px); }

  .nav-links { width: 100%; padding: 24px 18px; }

  .step b { font-size: 26px; }

  .social-links a { width: 42px; height: 42px; }
  .social-links svg { width: 20px; height: 20px; }
}

/*Estilos generales del boton whatsapp*/
.whatsapp-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  animation: breathe 2s ease-in-out infinite;
}

/*Estilos solo al icono whatsapp*/
.whatsapp-btn i {
  color: #fff;
  font-size: 24px;
  animation: beat 2s ease-in-out infinite;
  text-decoration: none;
}

/*Estilos con animation contorno respirando*/
@keyframes breathe {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

/*Estilos de animacion del icono latiendo*/
@keyframes beat {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* SweetAlert Popup */
.swal2-popup {
  background: #1a0b0e !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px !important;
  font-family: "Open Sans", sans-serif !important;
}

/* Title */
.swal2-title {
  color: #fff !important;
}

/* Text */
.swal2-html-container {
  color: rgba(255,255,255,0.8) !important;
}

/* Confirm Button */
.swal2-confirm {
  background: linear-gradient(135deg, #ff003c, #ff3b5f) !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 12px 24px !important;
  font-weight: 600 !important;
  box-shadow: 0 8px 25px rgba(255, 0, 60, 0.3);
}

.swal2-confirm:hover {
  transform: translateY(-2px);
}
