:root {
  --navy-950: #071a33;
  --navy-900: #0b2545;
  --navy-800: #12325c;
  --navy-700: #1c4479;
  --gold-700: #8a6516;
  --gold-500: #c9a24b;
  --gold-300: #e3cf9a;
  --ivory: #f8f5ee;
  --paper: #ffffff;
  --ink: #18212f;
  --muted: #566070;
  --rule: #e4dece;

  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(64px, 9vw, 112px);
  --radius: 3px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy-900);
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.25;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--navy-700);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

svg {
  display: block;
}

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--gold-500);
  color: var(--navy-950);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 12px;
}

/* Botones */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8em 1.5em;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn--navy {
  background: var(--navy-900);
  color: #fff;
}

.btn--navy:hover {
  background: var(--navy-700);
}

.btn--gold {
  background: var(--gold-500);
  color: var(--navy-950);
}

.btn--gold:hover {
  background: var(--gold-300);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* Barra superior */

.topbar {
  background: var(--navy-950);
  color: #d5dbe5;
  font-size: 0.875rem;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 40px;
}

.topbar a {
  color: inherit;
  text-decoration: none;
}

.topbar a:hover {
  color: var(--gold-300);
}

.topbar__mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar__mail svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--gold-500);
  stroke-width: 1.6;
}

.topbar__links {
  display: flex;
  gap: 24px;
}

/* Cabecera */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.2s ease;
}

.header.is-stuck {
  box-shadow: 0 6px 24px -12px rgba(7, 26, 51, 0.35);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--navy-900);
}

.brand__mark {
  width: 44px;
  height: auto;
  flex: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand__over {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-700);
}

.brand__name {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__list {
  display: flex;
  gap: 26px;
}

.nav__list a {
  display: block;
  padding: 8px 0;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav__list a:hover,
.nav__list a.is-active {
  color: var(--navy-900);
  border-bottom-color: var(--gold-500);
}

.nav__cta {
  padding: 0.7em 1.2em;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-900);
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Portada */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 520px at 88% 18%, rgba(46, 96, 163, 0.55), transparent 70%),
    linear-gradient(165deg, var(--navy-900) 0%, var(--navy-950) 100%);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 64px;
  padding-block: clamp(64px, 8vw, 104px) clamp(136px, 14vw, 184px);
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-300);
}

.hero__eyebrow::before {
  content: "";
  flex: none;
  width: 36px;
  height: 2px;
  background: var(--gold-500);
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.5rem, 5.6vw, 4.25rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero__lead {
  max-width: 52ch;
  margin: 26px 0 36px;
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: #d8deea;
}

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

.hero__media {
  position: relative;
  justify-self: end;
  width: min(100%, 470px);
}

.hero__media::before {
  content: "";
  position: absolute;
  inset: -16px -16px 16px 16px;
  border: 1px solid var(--gold-500);
}

.hero__photo {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 70% 50%;
}

.hero__inset {
  position: absolute;
  left: -56px;
  bottom: -40px;
  width: 150px;
  height: auto;
  border: 6px solid #fff;
  box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.6);
}

/* Niveles de formación */

.levels {
  position: relative;
  z-index: 2;
  margin-top: -72px;
}

.levels__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  filter: drop-shadow(0 18px 26px rgba(7, 26, 51, 0.14));
}

.level {
  display: flex;
  flex-direction: column;
  padding: 30px 32px 28px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  border-top: 4px solid var(--gold-500);
  border-right: 1px solid var(--rule);
  transition: background-color 0.18s ease;
}

.level:last-child {
  border-right: 0;
}

.level:hover {
  background: var(--ivory);
}

.level__title {
  margin-bottom: 10px;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.level p {
  color: var(--muted);
  font-size: 1rem;
}

.level__more {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-700);
}

.level:hover .level__more {
  color: var(--gold-700);
}

/* Secciones */

.section {
  padding-block: var(--section);
}

.section--tint {
  background: var(--ivory);
  border-block: 1px solid var(--rule);
}

.section__head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-700);
}

.kicker::before {
  content: "";
  flex: none;
  width: 28px;
  height: 2px;
  background: var(--gold-500);
}

.kicker--light {
  color: var(--gold-300);
}

.lead {
  margin-top: 18px;
  font-size: clamp(1.1rem, 1.4vw, 1.2rem);
  line-height: 1.6;
  color: #36414f;
}

.note {
  margin: 28px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.link-arrow {
  display: inline-block;
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--navy-700);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.link-arrow:hover {
  color: var(--gold-700);
  border-bottom-color: currentColor;
}

/* La Universidad */

.about {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

.about__text p:not(.kicker):not(.lead) {
  color: #36414f;
}

.principles {
  padding: 8px 36px;
  background: var(--ivory);
  border-top: 4px solid var(--navy-900);
}

.principles dl {
  margin: 0;
}

.principles__item {
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}

.principles__item:last-child {
  border-bottom: 0;
}

.principles dt {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy-900);
}

.principles dd {
  margin: 0;
  color: #36414f;
}

/* Áreas de formación */

.areas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--paper);
  border: 1px solid var(--rule);
}

.area {
  display: flex;
  flex-direction: column;
  padding: 34px 32px 30px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.area:nth-child(3n) {
  border-right: 0;
}

.area:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.area__num {
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-700);
}

.area h3 {
  margin-bottom: 12px;
}

.area p {
  color: var(--muted);
  font-size: 1rem;
}

.area .link-arrow {
  align-self: flex-start;
  margin-top: auto;
}

/* Admisión */

.admission {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

.steps {
  margin-top: 36px;
  counter-reset: paso;
}

.step {
  position: relative;
  padding: 0 0 30px 72px;
  counter-increment: paso;
}

.step::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: -4px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy-900);
  background: var(--paper);
  border: 1px solid var(--gold-500);
  border-radius: 50%;
}

.step::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 46px;
  bottom: 4px;
  width: 1px;
  background: var(--rule);
}

.step:last-child {
  padding-bottom: 0;
}

.step:last-child::after {
  display: none;
}

.step h3 {
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.step p {
  margin: 0;
  color: var(--muted);
}

.panel {
  position: sticky;
  top: 120px;
  padding: 40px 36px;
  color: #d8deea;
  background: var(--navy-900);
  border-top: 4px solid var(--gold-500);
}

.panel h3 {
  margin-bottom: 14px;
  font-size: 1.5rem;
  color: #fff;
}

.panel .btn {
  margin-top: 10px;
}

.panel__mail {
  margin: 18px 0 0;
  font-size: 0.95rem;
  color: var(--gold-300);
}

/* Vida universitaria */

.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
}

.feature {
  padding-top: 26px;
  border-top: 1px solid var(--gold-500);
}

.feature__icon {
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  fill: none;
  stroke: var(--navy-900);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

/* Contacto */

.contact {
  position: relative;
  overflow: hidden;
  color: #d8deea;
  background: linear-gradient(165deg, var(--navy-900) 0%, var(--navy-950) 100%);
}

.contact__seal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  color: var(--gold-500);
  opacity: 0.08;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.contact__seal-text {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
}

.contact__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.contact h2 {
  color: #fff;
}

.contact .lead {
  max-width: 48ch;
  color: #d8deea;
}

.contact__card {
  padding: 36px;
  background: rgba(7, 26, 51, 0.82);
  border: 1px solid rgba(201, 162, 75, 0.45);
}

.contact__label {
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-300);
}

.contact__mail {
  display: block;
  margin-bottom: 26px;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  color: #fff;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact__mail:hover {
  color: var(--gold-300);
}

/* Pie de página */

.footer {
  color: #b9c2d0;
  background: var(--navy-950);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.97rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-block: 64px 48px;
}

.footer__name {
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
}

.footer__brand p:last-child {
  max-width: 34ch;
  margin: 0;
}

.footer__title {
  margin-bottom: 16px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-300);
}

.footer li {
  margin-bottom: 10px;
}

.footer a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.footer__bottom .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 22px;
}

.footer__bottom p {
  margin: 0;
}

/* Página de error */

.error-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 40px var(--gutter);
  text-align: center;
  color: #d8deea;
  background: linear-gradient(165deg, var(--navy-900) 0%, var(--navy-950) 100%);
}

.error-page__code {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 600;
  line-height: 1;
  color: var(--gold-500);
}

.error-page h1 {
  margin-bottom: 14px;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: #fff;
}

.error-page p {
  max-width: 44ch;
  margin: 0 auto 28px;
}

/* Adaptación a pantallas */

@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    inset: 100% 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 12px var(--gutter) 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 24px 32px -24px rgba(7, 26, 51, 0.4);
  }

  .nav.is-open {
    display: flex;
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
  }

  .nav__list a {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
  }

  .nav__list a:hover,
  .nav__list a.is-active {
    border-bottom-color: var(--rule);
    color: var(--gold-700);
  }
}

@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__inner {
    gap: 56px;
  }

  .hero__media {
    justify-self: start;
    width: calc(100% - 16px);
    max-width: 640px;
  }

  .hero__photo {
    aspect-ratio: 16 / 10;
    object-position: 60% 40%;
  }

  .hero__inset {
    left: auto;
    right: 20px;
    bottom: -32px;
    width: 104px;
    border-width: 5px;
  }

  .about,
  .admission,
  .contact__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel {
    position: static;
  }

  .areas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .area:nth-child(3n) {
    border-right: 1px solid var(--rule);
  }

  .area:nth-child(2n) {
    border-right: 0;
  }

  .area:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--rule);
  }

  .area:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 84px;
  }

  .topbar__links {
    display: none;
  }

  .hero__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }

  .hero__eyebrow::before {
    display: none;
  }

  .hero__media::before {
    inset: -10px -10px 10px 10px;
  }

  .hero__inset {
    width: 88px;
  }

  .contact__seal {
    left: auto;
    right: -180px;
    top: auto;
    bottom: -140px;
    width: 420px;
    transform: none;
  }

  .header__inner {
    min-height: 72px;
  }

  .brand__mark {
    width: 38px;
  }

  .brand__name {
    font-size: 1.35rem;
  }

  .levels {
    margin-top: -56px;
  }

  .levels__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .level {
    border-right: 0;
    border-top-width: 0;
    border-bottom: 1px solid var(--rule);
  }

  .level:first-child {
    border-top-width: 4px;
  }

  .level:last-child {
    border-bottom: 0;
  }

  .areas,
  .features {
    grid-template-columns: minmax(0, 1fr);
  }

  .area,
  .area:nth-child(3n) {
    border-right: 0;
  }

  .area:nth-last-child(-n + 3),
  .area:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--rule);
  }

  .area:last-child {
    border-bottom: 0;
  }

  .principles,
  .panel,
  .contact__card {
    padding-inline: 24px;
  }

  .step {
    padding-left: 62px;
  }

  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

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

  * {
    transition: none !important;
  }
}

@media print {
  .topbar,
  .nav,
  .nav-toggle,
  .contact__seal {
    display: none;
  }

  .header {
    position: static;
  }
}
