
/* ==========================
   JAY'S WORLD — TITLE SCREEN
========================== */

* {
  box-sizing: border-box;
}

  
html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  background-image:url(https://i.pinimg.com/originals/63/e3/f2/63e3f243a874331731cbf7668593e80b.gif);
  font-family: Georgia, "Times New Roman", serif;
  background-repeat:no-repeat;
  background-size:100%;
  }

button {
  font: inherit;
}

/* MARIPOSAS */

.butterflies {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.butterflies span {
  position: absolute;
  color: #d3d9ff;
  font-size: 27px;
  opacity: 0.7;
  animation: butterfly-float 5s ease-in-out infinite;
}

.butterflies span:nth-child(1) {
  top: 28%;
  left: 12%;
}

.butterflies span:nth-child(2) {
  top: 43%;
  left: 45%;
  animation-delay: -2s;
}

.butterflies span:nth-child(3) {
  top: 19%;
  right: 13%;
  animation-delay: -3s;
}

.butterflies span:nth-child(4) {
  top: 65%;
  right: 8%;
  animation-delay: -1s;
}

@keyframes butterfly-float {
  0%, 100% {
    transform: translateY(0) rotate(-8deg);
  }

  50% {
    transform: translateY(-12px) rotate(8deg);
  }
}

/* PASTO DECORATIVO */

.grass {
  position: absolute;
  z-index: -1;
  right: -5%;
  bottom: -25px;
  left: -5%;
  height: 23%;
  pointer-events: none;
}

/* TÍTULO */

.menu-area {
  position: relative;
  z-index: 2;
  width: 48%;
  padding: clamp(30px, 7vh, 80px) 0 100px
           clamp(25px, 7vw, 110px);
}

.logo-area h1 {
  margin: 0;
  max-width: 650px;

  color: #e1e5ff;
  font-size: clamp(38px, 6vw, 78px);
  font-weight: normal;
  font-style: italic;
  line-height: 0.98;

  text-shadow:
    0 3px 2px #22234d,
    0 0 18px rgba(126, 151, 255, 0.45);
}

.logo-area h1 span {
  color: var(--violet);
}

.title-divider {
  margin-top: 18px;
  color: #b5c8ff;
  font-size: clamp(12px, 1.5vw, 20px);
  letter-spacing: 2px;
  white-space: nowrap;
  opacity: 0.85;
}

/* OPCIONES */

.main-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: clamp(35px, 10vh, 110px);
}

.menu-option {
  display: flex;
  align-items: center;
  gap: 14px;

  min-width: 240px;
  padding: 8px 14px;

  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: #d3d4f3;

  font-size: clamp(21px, 2.5vw, 31px);
  text-align: left;
  cursor: pointer;

  transition:
    color 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.selector {
  display: inline-block;
  width: 16px;
  color: #c7b9ff;
  opacity: 0;
  transform: translateX(-6px);
  transition: 0.2s ease;
}

.menu-option:hover,
.menu-option.selected {
  color: #ffffff;
  border-bottom-color: rgba(197, 208, 255, 0.55);
  transform: translateX(7px);
}

.menu-option:hover .selector,
.menu-option.selected .selector {
  opacity: 1;
  transform: translateX(0);
}

.menu-option:focus-visible {
  outline: 2px solid #c7d4ff;
  outline-offset: 4px;
}

.menu-hint {
  margin-top: 25px;
  color: #aebce9;
  font-family: monospace;
  font-size: 12px;
  opacity: 0.7;
}

/* PERSONAJE */

.character {
  position: absolute;
  z-index: 1;
  right: 8%;
  bottom: 0;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  width: 45%;
  height: 85%;

  pointer-events: none;
}

.character img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom;

  filter: drop-shadow(0 0 14px rgba(174, 184, 255, 0.2));
}

/* VENTANAS */

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;

  display: grid;
  place-items: center;
  padding: 20px;

  background: rgba(4, 6, 24, 0.8);
}

.modal-box {
  width: min(100%, 380px);
  padding: 28px;

  border: 2px solid #777fbd;
  background: #111638;
  box-shadow: 0 0 35px rgba(101, 121, 224, 0.25);

  text-align: center;
}

.modal-box h2 {
  color: #e1e5ff;
  font-weight: normal;
}

.modal-box p {
  color: #bfc8ec;
}

.modal-box button {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;

  border: 1px solid #727eaf;
  background: #202958;
  color: white;
  cursor: pointer;
}

.modal-box button:hover {
  background: #34427b;
}

/* CELULARES */

@media (max-width: 650px) {
  .title-screen {
    min-height: 100svh;
  }

  .menu-area {
    width: 100%;
    padding: 35px 20px 260px;
  }

  .logo-area h1 {
    max-width: 360px;
    font-size: clamp(40px, 11vw, 62px);
  }

  .title-divider {
    white-space: normal;
  }

  .main-menu {
    margin-top: 35px;
    gap: 4px;
  }

  .menu-option {
    min-width: 215px;
    font-size: 23px;
  }

  .character {
    right: -3%;
    width: 65%;
    height: 47%;
    opacity: 0.8;
  }

  .grass {
    height: 18%;
  }

  .menu-hint {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
