:root {
  --azul: #103a8c;
  --azul-2: #0f62fe;
  --celeste: #1fb6ff;
  --morado: #7c3aed;
  --verde: #10b981;
  --amarillo: #fbbf24;
  --oscuro: #07111f;
  --texto: #223047;
  --claro: #f6f8ff;
  --blanco: #ffffff;
  --sombra: 0 24px 60px rgba(12, 31, 66, .18);
  --radio: 28px;
  --ancho-pagina: calc(100% - 4cm);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(31, 182, 255, .22), transparent 34%),
    radial-gradient(circle at top right, rgba(124, 58, 237, .16), transparent 28%),
    linear-gradient(180deg, #f7f9ff 0%, #eef5ff 100%);
  color: var(--texto);
  line-height: 1.55;
  overflow-x: hidden;
}

a { text-decoration: none; }
img { max-width: 100%; display: block; }

.topbar {
  width: var(--ancho-pagina);
  margin: 14px auto 0;
  padding: 11px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(16, 58, 140, .10);
  position: sticky;
  top: 14px;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--azul);
  font-size: 22px;
  letter-spacing: -.5px;
  white-space: nowrap;
}

.logo-mark {
  width: 170px;
  height: 50px;
  object-fit: contain;
  border-radius: 12px;
  background: white;
  padding: 4px 8px;
  box-shadow: 0 10px 24px rgba(16, 58, 140, .12);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--azul), var(--morado));
  cursor: pointer;
  position: relative;
  box-shadow: 0 12px 26px rgba(16, 58, 140, .22);
}

.menu-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 3px;
  border-radius: 99px;
  background: white;
  transition: .3s;
}

.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 22px; }
.menu-toggle span:nth-child(3) { top: 30px; }

.menu-toggle.active span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

nav a {
  color: #2a3b5f;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  transition: .25s;
}

nav a:hover { background: #e9efff; color: var(--azul); }

.hero {
  width: var(--ancho-pagina);
  margin: 24px auto 0;
  min-height: 500px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 28px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--azul);
  background: #eaf1ff;
  font-weight: 900;
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -2px;
  color: var(--oscuro);
  margin-bottom: 18px;
}

h1 strong {
  color: transparent;
  background: linear-gradient(90deg, var(--azul), var(--morado), var(--celeste));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-text p { font-size: 17px; max-width: 720px; margin-bottom: 20px; color: #40516f; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--azul), var(--morado));
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(16, 58, 140, .22);
  border: none;
  cursor: pointer;
  transition: .25s;
}

.btn:hover { transform: translateY(-3px); }
.btn.secondary { color: var(--azul); background: white; box-shadow: 0 12px 24px rgba(16, 58, 140, .10); }

.hero-photo { position: relative; min-height: 460px; }

.main-photo {
  width: 100%; height: 440px; object-fit: cover;
  border-radius: 42px;
  box-shadow: var(--sombra);
  border: 10px solid rgba(255,255,255,.75);
}

.floating-card {
  position: absolute;
  left: -18px;
  bottom: 40px;
  max-width: 310px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  box-shadow: var(--sombra);
  border: 1px solid rgba(255,255,255,.8);
}

.floating-card h3 { color: var(--azul); margin-bottom: 8px; }

.section { width: var(--ancho-pagina); margin: 44px auto; }

.section-title {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  align-items: end;
  margin-bottom: 22px;
}

.section-title h2 { font-size: clamp(28px, 3vw, 38px); line-height: 1.1; color: var(--oscuro); letter-spacing: -1px; }
.section-title p { color: #53627c; font-size: 16px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.card {
  background: var(--blanco);
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(11, 30, 70, .10);
  border: 1px solid rgba(255,255,255,.8);
}

.card img { width: 100%; height: 170px; object-fit: cover; }
.card-content { padding: 18px; }
.card h3 { color: var(--azul); margin-bottom: 7px; font-size: 20px; }

.ia-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: stretch;
  background: linear-gradient(135deg, #07111f, #123a83 60%, #7c3aed);
  color: white;
  border-radius: 38px;
  padding: 24px;
  box-shadow: var(--sombra);
  overflow: hidden;
}

.ia-visual {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 16px;
  min-height: 100%;
}

.ia-hero-image {
  width: 100%;
  height: 260px;
  min-height: 260px;
  object-fit: cover;
  border-radius: 28px;
}

.ia-content { padding: 10px 8px 10px 0; align-self: center; }
.ia-content h2 { font-size: clamp(28px, 3vw, 38px); line-height: 1.1; margin-bottom: 14px; }
.ia-content p { color: #dce8ff; margin-bottom: 12px; }

.ia-points {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 14px 0;
}

.ia-point {
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
}

.ia-point strong { display: block; margin-bottom: 6px; color: white; }
.ia-point span { display: block; color: #dce8ff; line-height: 1.45; }

.ia-guidelines {
  margin-bottom: 14px;
  padding-left: 20px;
  color: #dce8ff;
}

.ia-guidelines li { margin-bottom: 5px; }

.infografia-preview {
  display: grid;
  grid-template-columns: 132px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 22px;
  color: white;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  transition: .25s;
}

.infografia-preview:hover { transform: translateY(-2px); background: rgba(255,255,255,.18); }
.infografia-thumb { position: relative; width: 132px; }
.infografia-thumb img { width: 100%; height: 92px; object-fit: cover; object-position: top; border-radius: 14px; }
.zoom-hint {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  color: var(--azul);
  background: rgba(255,255,255,.96);
  box-shadow: 0 5px 14px rgba(7,17,31,.35);
  transition: transform .25s, background .25s;
}
.infografia-preview .zoom-hint { color: var(--azul); }
.zoom-hint svg { width: 18px; height: 18px; }
.infografia-preview:hover .zoom-hint { transform: scale(1.12); background: white; }
.infografia-preview strong { display: block; margin-bottom: 4px; }
.infografia-preview span { color: #dce8ff; }

.ia-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.ia-gallery-item {
  min-height: 134px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .18);
}

.ia-gallery-item:last-child { grid-column: 1 / -1; min-height: 118px; }

.ia-gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,17,31,.06), rgba(7,17,31,.78));
  z-index: -1;
}

.ia-gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.ia-gallery-item figcaption {
  min-height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  color: white;
  font-weight: 900;
  line-height: 1.25;
  font-size: 14px;
  text-shadow: 0 2px 12px rgba(0,0,0,.32);
}

.image-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  z-index: 300;
}

.image-modal:target { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7,17,31,.86);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  z-index: 1;
  width: min(1100px, 96vw);
  max-height: 92vh;
  padding: 16px;
  border-radius: 24px;
  background: white;
  box-shadow: var(--sombra);
  overflow: auto;
}

.modal-content img {
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  margin-bottom: 10px;
  width: fit-content;
  display: block;
  padding: 9px 14px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--azul), var(--morado));
  font-weight: 900;
}

.access-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.access-card {
  min-height: 310px;
  border-radius: 34px;
  padding: 24px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  position: relative;
  box-shadow: var(--sombra);
  isolation: isolate;
}

.access-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,17,31,.12), rgba(7,17,31,.86));
  z-index: -1;
}

.access-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.access-card h3 { font-size: 24px; margin-bottom: 6px; }
.access-card p { margin-bottom: 14px; color: #edf5ff; }
.access-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--azul), var(--morado));
  box-shadow: 0 12px 28px rgba(7,17,31,.28);
  transition: transform .25s, box-shadow .25s;
}

.back-to-top:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(7,17,31,.34); }
.back-to-top:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 3px; }
.back-to-top svg { width: 25px; height: 25px; }

footer {
  margin-top: 44px;
  padding: 26px 20px;
  text-align: center;
  color: white;
  background: #07111f;
}

@media (max-width: 900px) {
  .topbar, .hero, .section { width: 92%; }
  .topbar { border-radius: 24px; align-items: center; }
  .menu-toggle { display: block; flex-shrink: 0; }

  nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 18px 40px rgba(16,58,140,.18);
  }

  nav.active { display: flex; }
  nav a { width: 100%; text-align: center; padding: 13px; background: #f3f7ff; }

  .hero { grid-template-columns: 1fr; min-height: auto; margin-top: 28px; }
  .hero-photo { min-height: auto; }
  .main-photo { height: 380px; border-radius: 30px; }
  .floating-card { left: 18px; right: 18px; bottom: 18px; max-width: none; }
  .section-title { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .ia-panel { grid-template-columns: 1fr; padding: 18px; border-radius: 30px; }
  .ia-visual { grid-template-rows: auto auto; }
  .ia-hero-image { height: 230px; min-height: 230px; }
  .ia-points { grid-template-columns: 1fr; }
  .ia-gallery { grid-template-columns: 1fr; }
  .ia-gallery-item { min-height: 210px; }
  .access-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .topbar { width: 94%; margin-top: 10px; padding: 10px 12px; top: 8px; }
  .logo { font-size: 18px; }
  .logo-mark { width: 128px; height: 38px; }
  h1 { font-size: 43px; letter-spacing: -2px; }
  .hero-text p { font-size: 16px; }
  .actions, .access-buttons { flex-direction: column; }
  .btn { width: 100%; }
  .main-photo { height: 310px; border-width: 6px; }
  .section { margin: 48px auto; }
  .card img { height: 170px; }
  .ia-hero-image { height: 190px; min-height: 190px; border-radius: 22px; }
  .ia-content { padding: 8px; }
  .infografia-preview { grid-template-columns: 1fr; }
  .infografia-thumb { width: 100%; }
  .infografia-thumb img { height: 150px; }
  .ia-gallery-item { min-height: 180px; }
  .access-card { min-height: 330px; padding: 22px; border-radius: 26px; }
  .floating-card { position: relative; left: auto; right: auto; bottom: auto; margin-top: -55px; }
  .back-to-top { right: 16px; bottom: 16px; width: 46px; height: 46px; }
}
