:root {
  --verde: #0b542f;
  --verde-oscuro: #063c22;
  --verde-claro: #dff2df;
  --naranja: #ff6b19;
  --naranja-claro: #ffb982;
  --crema: #fffaf0;
  --blanco: #ffffff;
  --tinta: #173626;
  --sombra-verde: rgba(6, 60, 34, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--verde-oscuro);
}

body {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--tinta);
  background:
    linear-gradient(90deg, rgba(255, 250, 240, 0.96) 0%, rgba(255, 250, 240, 0.84) 35%, rgba(255, 250, 240, 0.2) 63%, rgba(255, 250, 240, 0.06) 100%),
    url("assets/fondo-barrio.webp") center / cover fixed no-repeat;
  background-size: cover;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 250, 240, 0.12));
  content: "";
  pointer-events: none;
}

body::after {
  position: fixed;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 24%;
  background: linear-gradient(0deg, rgba(255, 250, 240, 0.68), transparent);
  content: "";
  pointer-events: none;
}

.cabecera {
  width: min(1640px, calc(100% - 72px));
  margin: 0 auto;
  padding-top: clamp(18px, 3vh, 30px);
}

.marca {
  display: inline-block;
  width: clamp(220px, 22vw, 300px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  line-height: 0;
}

.marca img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(6, 60, 34, 0.08));
}

.portada {
  display: grid;
  grid-template-columns: minmax(520px, 1.1fr) minmax(440px, 0.9fr);
  align-items: center;
  gap: clamp(20px, 4vw, 72px);
  width: min(1640px, calc(100% - 72px));
  margin: 0 auto;
  padding: clamp(24px, 5vh, 72px) 0 clamp(32px, 5vh, 64px);
}

.mensaje {
  position: relative;
  z-index: 2;
  left: clamp(24px, 2.5vw, 44px);
  max-width: 590px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.aviso {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 10px 16px;
  border: 1px solid rgba(11, 84, 47, 0.1);
  border-radius: 999px;
  color: var(--verde);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(6, 60, 34, 0.06);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.aviso__punto {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--naranja);
  box-shadow: 0 0 0 5px rgba(255, 107, 25, 0.13);
}

h1 {
  margin: 0;
  color: var(--verde);
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: clamp(3.35rem, 4.35vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.79;
}

.titulo-bloque {
  position: relative;
  width: fit-content;
}

h1 span {
  position: relative;
  display: inline-block;
  color: var(--naranja);
  white-space: nowrap;
}

h1 span::after {
  position: absolute;
  right: 0.05em;
  bottom: -0.14em;
  width: 70%;
  height: 0.13em;
  border-radius: 999px;
  background: var(--naranja-claro);
  content: "";
  transform: rotate(-2deg);
  transform-origin: right center;
}

.descripcion {
  max-width: 590px;
  margin: 30px 0 28px 4px;
  color: #294d39;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.75;
}

.instagram {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 4px;
  padding: 12px 16px 12px 13px;
  border: 2px solid var(--verde);
  border-radius: 18px;
  color: var(--verde);
  background: var(--blanco);
  box-shadow: 6px 7px 0 var(--verde);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.instagram:hover,
.instagram:focus-visible {
  box-shadow: 3px 4px 0 var(--verde);
  transform: translate(3px, 3px);
}

.instagram:focus-visible {
  outline: 3px solid var(--naranja-claro);
  outline-offset: 4px;
}

.instagram svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: var(--naranja);
  stroke-width: 1.8;
}

.instagram__punto {
  fill: var(--naranja);
  stroke: none;
}

.instagram span {
  color: #678071;
  font-size: 0.82rem;
  font-weight: 500;
}

.instagram strong {
  font-size: 0.92rem;
}

.personaje {
  --move-x: 0px;
  --move-y: 0px;
  position: relative;
  right: clamp(60px, 6vw, 120px);
  display: grid;
  min-height: min(620px, 65vh);
  place-items: center;
  transform: translate(var(--move-x), var(--move-y));
  transition: transform 300ms ease-out;
}

.regalon {
  position: relative;
  z-index: 2;
  width: min(43vw, 520px);
  height: auto;
  filter: drop-shadow(0 24px 16px rgba(5, 47, 27, 0.16));
  animation: saludo 3.8s ease-in-out infinite;
}

.sombra {
  position: absolute;
  z-index: 1;
  bottom: 9%;
  width: 52%;
  height: 32px;
  border-radius: 50%;
  background: rgba(6, 60, 34, 0.19);
  filter: blur(11px);
  animation: sombra-viva 3.8s ease-in-out infinite;
}

.pie {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: fit-content;
  margin: 0 auto 18px;
  padding: 13px 22px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(6, 60, 34, 0.08);
  backdrop-filter: blur(8px);
  color: var(--verde);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.pie i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--naranja);
}

.decoracion {
  position: fixed;
  z-index: -1;
  border: 3px solid var(--naranja);
  opacity: 0.42;
  transform: rotate(18deg);
}

.decoracion--uno {
  top: 18%;
  left: 3%;
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.decoracion--dos {
  right: 5%;
  bottom: 12%;
  width: 16px;
  height: 16px;
  border-color: var(--verde);
  border-radius: 50%;
}

.js .cabecera,
.js .mensaje,
.js .personaje,
.js .pie {
  opacity: 0;
}

.js .is-ready .cabecera,
.js .is-ready .mensaje,
.js .is-ready .personaje,
.js .is-ready .pie {
  opacity: 1;
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js .mensaje {
  transform: translateY(18px);
}

.js .personaje {
  transform: translate(24px, 12px);
}

.js .is-ready .mensaje {
  transform: translateY(0);
}

.js .is-ready .personaje {
  transform: translate(var(--move-x), var(--move-y));
}

@keyframes saludo {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1.5deg); }
}

@keyframes sombra-viva {
  0%, 100% { opacity: 0.8; transform: scaleX(1); }
  50% { opacity: 0.55; transform: scaleX(0.9); }
}

@media (max-width: 900px) {
  body {
    background:
      linear-gradient(180deg, rgba(255, 250, 240, 0.93) 0%, rgba(255, 250, 240, 0.7) 54%, rgba(255, 250, 240, 0.36) 100%),
      url("assets/fondo-barrio.webp") center / cover fixed no-repeat;
    background-size: cover;
  }

  .cabecera {
    display: flex;
    justify-content: center;
    width: calc(100% - 36px);
  }

  .marca {
    width: min(270px, 68vw);
  }

  .portada {
    grid-template-columns: 1fr;
    gap: 10px;
    width: min(680px, calc(100% - 36px));
    padding-top: 34px;
    text-align: center;
  }

  .mensaje {
    left: 0;
    max-width: none;
    padding: clamp(24px, 7vw, 38px);
  }

  .aviso,
  .instagram {
    margin-left: auto;
    margin-right: auto;
  }

  h1 {
    font-size: clamp(3.5rem, 13vw, 5.5rem);
  }

  .titulo-bloque {
    margin-right: auto;
    margin-left: auto;
  }

  .descripcion {
    margin-right: auto;
    margin-left: auto;
  }

  .personaje {
    right: 0;
    min-height: 510px;
  }

  .regalon {
    width: min(78vw, 490px);
  }

}

@media (max-width: 540px) {
  .cabecera {
    padding-top: 22px;
  }

  .portada {
    width: min(100% - 28px, 470px);
    padding-top: 24px;
  }

  .aviso {
    padding: 8px 12px;
    font-size: 0.66rem;
    letter-spacing: 0.03em;
  }

  h1 {
    font-size: clamp(3.15rem, 15vw, 4.45rem);
    line-height: 0.82;
  }

  h1 span {
    white-space: normal;
  }

  .descripcion {
    max-width: 390px;
    margin-bottom: 22px;
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .instagram {
    gap: 8px;
    padding: 10px 12px;
    border-radius: 15px;
    box-shadow: 4px 5px 0 var(--verde);
  }

  .instagram span {
    display: none;
  }

  .personaje {
    min-height: 390px;
  }

  .regalon {
    width: min(86vw, 375px);
  }

  .pie {
    flex-wrap: wrap;
    gap: 8px 10px;
    padding-top: 8px;
    font-size: 0.66rem;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .cabecera {
    padding-top: 22px;
  }

  .portada {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .personaje {
    min-height: 500px;
  }

  .regalon {
    width: min(39vw, 455px);
  }

}

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