:root {
  --bg-color: #f7f4f8;
  --card-bg: rgba(255, 255, 255, 0.58);
  --text-main: #221b2d;
  --text-muted: #625a74;
  
  /* Accent Pastels */
  --pastel-green: #e2f0d9;
  --pastel-blue: #d9eefb;
  --pastel-purple: #ebd9fc;
  --pastel-coral: #ffe3d9;
  --pastel-mint: #d9f5eb;
  --pastel-yellow: #fff3d9;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  --page-spot: 0;
  background:
    radial-gradient(52rem 38rem at 10% 4%, rgba(255, 0, 128, 0.16), transparent 58%),
    radial-gradient(46rem 32rem at 90% 10%, rgba(255, 174, 0, 0.15), transparent 56%),
    radial-gradient(32rem 24rem at 50% 50%, rgba(255, 79, 90, 0.08), transparent 60%),
    linear-gradient(180deg, #fbf8fb 0%, #f7f4f8 45%, #f4f1f7 100%);
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(38rem 24rem at 18% 24%, rgba(255, 0, 128, 0.10), transparent 60%),
    radial-gradient(40rem 24rem at 78% 32%, rgba(255, 174, 0, 0.10), transparent 58%),
    radial-gradient(30rem 20rem at 50% 72%, rgba(255, 79, 90, 0.07), transparent 56%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      28rem 20rem at var(--page-mx, 50%) var(--page-my, 30%),
      rgba(255, 107, 139, var(--page-spot)),
      transparent 62%
    ),
    radial-gradient(
      24rem 18rem at calc(var(--page-mx, 50%) + 7rem) calc(var(--page-my, 30%) - 2rem),
      rgba(255, 174, 0, calc(var(--page-spot) * 0.82)),
      transparent 64%
    );
  transition: opacity 0.25s ease;
}

body > * {
  position: relative;
  z-index: 1;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0 0 24px 24px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.brand-logo:hover {
  transform: scale(1.03);
}

.logo-icon {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

.logo-horizontal {
  height: 52px;
  width: auto;
  max-width: 260px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.04));
  display: block;
}

nav {
  --nav-spot: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 10px 28px rgba(92, 34, 98, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

nav::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 0, 128, 0.30), rgba(255, 174, 0, 0.30));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
}

nav::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), transparent 32%),
    radial-gradient(
      220px circle at var(--nav-mx, 50%) var(--nav-my, 50%),
      rgba(255, 107, 139, var(--nav-spot)),
      transparent 68%
    ),
    radial-gradient(
      180px circle at calc(var(--nav-mx, 50%) + 2.2rem) calc(var(--nav-my, 50%) - 0.5rem),
      rgba(255, 174, 0, calc(var(--nav-spot) * 0.82)),
      transparent 70%
    );
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

nav:hover {
  --nav-spot: 0.22;
  box-shadow:
    0 14px 34px rgba(92, 34, 98, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease, background-color 0.25s ease, box-shadow 0.25s ease;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  position: relative;
  z-index: 1;
}

nav a:hover {
  color: var(--text-main);
  transform: translateY(-1px);
  background: rgba(255,255,255,0.36);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.aws-badge {
  background-color: rgba(255, 255, 255, 0.8);
  color: #4c5565;
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.3s ease;
}

.aws-badge:hover {
  background-color: #cbd5e1;
}

/* Hamburger toggle — hidden on desktop */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 10px;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border-radius: 10px;
  transition: background 0.2s ease;
}
.menu-toggle:hover { background-color: rgba(0,0,0,0.04); }
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--text-main);
  transition: transform 0.3s ease, opacity 0.3s ease, translate 0.3s ease;
  transform-origin: center;
}
.menu-toggle.is-open span:nth-child(1) {
  translate: 0 9px 0;
  transform: rotate(45deg);
}
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) {
  translate: 0 -9px 0;
  transform: rotate(-45deg);
}

/* Prevent body scroll when menu is open */
body.no-scroll { overflow: hidden; }

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-logo {
  width: 100%;
  max-width: 500px;
  height: auto;
  margin-bottom: 1.5rem;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #1f1727;
  text-shadow: 0 10px 30px rgba(255,255,255,0.35);
}

.hero p {
  font-size: 1.15rem;
  color: rgba(70, 61, 89, 0.92);
  font-weight: 600;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.hero-btn-alt {
  color: #fff;
  background: linear-gradient(135deg, #ff0080 0%, #ff4f5a 45%, #ffae00 100%);
  box-shadow: 0 10px 24px rgba(255, 0, 128, 0.18);
}

.hero-btn-alt:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(255, 79, 90, 0.22);
}

/* Services Grid */
.services-container {
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
  width: 100%;
  perspective: 1000px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* CARDS CON PERSPECTIVA Y SPOTLIGHT */
.service-card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 1.85rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 32px rgba(76, 45, 96, 0.08), inset 0 1px 0 rgba(255,255,255,0.45);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Brillo dinámico (Spotlight) */
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 18px;
  background: radial-gradient(
    300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 107, 139, 0.18),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.service-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), transparent 28%),
    inherit;
  z-index: -1;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover {
  box-shadow: 0 18px 36px rgba(92, 34, 98, 0.12);
  border-color: rgba(255, 107, 139, 0.35);
}

/* Elevación de contenidos por encima del spotlight */
.service-card > * {
  position: relative;
  z-index: 2;
}

.service-card h3,
.service-card p,
.card-icon {
  position: relative;
  z-index: 2;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card:hover .card-icon {
  transform: translateY(-2px) scale(1.1) rotate(-3deg);
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  transition: color 0.3s ease, transform 0.3s ease;
}

.service-card:hover h3 {
  transform: translateY(-1px);
  color: #1a202c;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

/* Colores Pasteles por Card */
.card-1 .card-icon { background-color: var(--pastel-green); color: #2e7d32; }
.card-2 .card-icon { background-color: var(--pastel-blue); color: #1565c0; }
.card-3 .card-icon { background-color: var(--pastel-purple); color: #6a1b9a; }
.card-4 .card-icon { background-color: var(--pastel-coral); color: #c62828; }
.card-5 .card-icon { background-color: var(--pastel-mint); color: #00695c; }
.card-6 .card-icon { background-color: var(--pastel-yellow); color: #f57f17; }

/* Footer & Contacto */
footer {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.24);
  border-top: 1px solid rgba(255,255,255,0.35);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 28px 28px 0 0;
}

.contact-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto 2.5rem;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  border-radius: 30px;
  background-color: rgba(255,255,255,0.42);
  border: 1px solid rgba(255,255,255,0.5);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-btn:hover {
  background-color: rgba(255,255,255,0.62);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 24px rgba(92, 34, 98, 0.08);
}

.social-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.social-btn:hover svg {
  transform: scale(1.15);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Mobile Breakpoints */
@media (max-width: 768px) {
  header {
    padding: 1.1rem 1rem;
    position: relative;
    z-index: 50;
  }
  .logo-horizontal { height: 40px; max-width: 190px; }

  .menu-toggle { display: flex; }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: -8px 0 24px rgba(64, 33, 72, 0.12);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: 5.5rem 1.5rem 1.5rem;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 40;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
      -8px 0 24px rgba(64, 33, 72, 0.12),
      inset 0 1px 0 rgba(255,255,255,0.35);
  }
  nav.is-open { right: 0; }

  nav a {
    width: 100%;
    padding: 1rem 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 1px solid #f1f5f9;
    border-radius: 14px;
  }
  nav a:hover { transform: translateX(4px); }

  .aws-badge {
    display: flex !important;
    margin-top: 1.5rem;
    align-self: flex-start;
    font-size: 0.8rem;
  }
  .hero h1 { font-size: 2rem; }
  .hero-logo { max-width: 320px; }
  .hero-btn { width: min(100%, 18rem); }
  .services-grid { grid-template-columns: 1fr; }

  /* Dim backdrop when menu open */
  body.menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 30;
  }
}

@media (max-width: 420px) {
  .logo-horizontal { height: 34px; max-width: 160px; }
  nav { padding-top: 4.75rem; }
  .hero-logo { max-width: 260px; }
  .hero h1 { font-size: 1.7rem; }
  .hero p  { font-size: 1rem; }
  .hero-btn { padding: 0.8rem 1.15rem; }
}
