* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 12% 25%, rgba(95, 169, 218, 0.28), transparent 34%),
    radial-gradient(ellipse at 88% 72%, rgba(245, 179, 53, 0.16), transparent 30%),
    linear-gradient(135deg, #f2f7fb 0%, #dceaf4 48%, #edf3f8 100%);
  font-family: Arial, Helvetica, sans-serif;
}

.hero {
  position: relative;
  width: min(88%, 1100px);
  height: auto;
  aspect-ratio: 1411 / 768;
  overflow: hidden;
  margin: 0 auto 56px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  background: linear-gradient(135deg, #0d3158, #287cac 55%, #f2b64e);
  box-shadow: 0 22px 55px rgba(16, 54, 88, 0.24);
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  animation: show-banner 18s infinite;
}

.hero-slide:first-child {
  opacity: 1;
}

.hero-slide:nth-child(2) {
  animation-delay: 6s;
}

.hero-slide:nth-child(3) {
  animation-delay: 12s;
}

@keyframes show-banner {
  0%,
  3% {
    opacity: 0;
  }

  6%,
  30% {
    opacity: 1;
  }

  33.333%,
  100% {
    opacity: 0;
  }
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  width: min(100% - 48px, 1184px);
  margin: 48px auto;
}

.quick-link {
  display: block;
  aspect-ratio: 0.605;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 11%;
  background-image: url("images/botones-referencia.jpg");
  background-repeat: no-repeat;
  background-size: 330% auto;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(10, 43, 77, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.quick-link-about {
  background-position: 3.6% 50%;
}

.quick-link-work {
  background-position: 50% 50%;
}

.quick-link-proposals {
  background-position: 96.6% 50%;
}

.quick-link:hover,
.quick-link:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px rgba(10, 43, 77, 0.2);
}

.quick-link:focus-visible {
  outline: 4px solid #f5b335;
  outline-offset: 4px;
}

.pdf-dialog {
  width: min(100% - 32px, 1100px);
  height: min(90vh, 850px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  color: #17324d;
  box-shadow: 0 20px 60px rgba(5, 25, 45, 0.35);
}

.pdf-dialog::backdrop {
  background: rgba(4, 20, 36, 0.78);
}

.pdf-toolbar {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: #eef4f8;
}

.pdf-toolbar h2 {
  margin: 0;
  font-size: 1.1rem;
}

.pdf-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pdf-open-link,
.pdf-close {
  color: #103b70;
  font: inherit;
  font-weight: 700;
}

.pdf-open-link {
  text-decoration: none;
}

.pdf-close {
  padding: 9px 14px;
  border: 0;
  border-radius: 6px;
  background: #103b70;
  color: #fff;
  cursor: pointer;
}

.pdf-frame {
  display: block;
  width: 100%;
  height: calc(100% - 64px);
  border: 0;
  background: #fff;
}

@media (max-width: 680px) {
  .hero {
    width: calc(100% - 28px);
    margin-bottom: 32px;
    border-radius: 14px;
  }

  .hero-slide {
    object-position: center;
  }

  .quick-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: calc(100% - 24px);
    gap: 8px;
    margin: 20px auto;
  }

  .quick-link {
    border-radius: 10%;
  }

  .pdf-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .pdf-frame {
    height: calc(100% - 100px);
  }

  .pdf-actions {
    justify-content: space-between;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .quick-links {
    width: calc(100% - 16px);
    gap: 5px;
  }

  .pdf-dialog {
    width: calc(100% - 16px);
  }

  .pdf-toolbar {
    padding: 10px 12px;
  }

  .pdf-actions {
    gap: 10px;
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-slide {
    animation: none;
  }

  .hero-slide:first-child {
    opacity: 1;
  }

  .quick-link {
    transition: none;
  }
}
