/* Suena Delicioso — landing. Ver ESTILO-VISUAL.md */

@font-face {
  font-family: "Caprasimo";
  src: url("assets/fonts/caprasimo.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Archivo Expanded";
  src: url("assets/fonts/archivo-expanded.woff2") format("woff2");
  font-weight: 600 900;
  font-stretch: 125%;
  font-display: swap;
}

:root {
  --rosa: #ff2d8d;
  --azul: #4501ff;
  --marino: #1a1196;
  --morado: #9a1fd6;
  --magenta: #ce00a9;
  --crema: #ffe8d7;
  --tinta: #0d0a4a;

  --display: "Caprasimo", "Cooper Black", Georgia, serif;
  --sans: "Archivo Expanded", "Arial Black", system-ui, sans-serif;

  --rebote: cubic-bezier(.34, 1.56, .64, 1);

  /* el JS los mueve con el puntero, de -1 a 1 */
  --mx: 0;
  --my: 0;
}

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

html { overflow-x: clip; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: clip; /* el anillo que gira no debe alargar la página */
  position: relative;
  color: var(--crema);
  font-family: var(--sans);
  font-stretch: 125%;
  font-weight: 800;
  background:
    radial-gradient(90vmax 70vmax at 105% 110%, #e8329f 0%, transparent 60%),
    linear-gradient(165deg, var(--azul) 0%, #5a10f2 45%, var(--morado) 100%);
  background-color: var(--azul);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

/* grano */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- flores de fondo ---------- */

.flowers {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.flower {
  position: absolute;
  width: var(--s);
  height: var(--s);
  fill: var(--marino);
  translate: calc(var(--mx) * var(--d) * 1px) calc(var(--my) * var(--d) * 1px);
  animation:
    pop .8s var(--rebote) var(--delay, .2s) both,
    spin var(--t, 40s) linear infinite;
}
.f1 { --s: clamp(120px, 17vw, 260px); --d: -14; --t: 46s; --delay: .15s; top: -5%; left: -4%; }
.f2 { --s: clamp(70px, 9vw, 140px);  --d: 22;  --t: 30s; --delay: .45s; top: 54%; left: 39%; }
.f3 { --s: clamp(110px, 15vw, 230px); --d: -26; --t: 52s; --delay: .3s;  bottom: 4%; right: -5%; animation-direction: normal, reverse; }
.f4 { --s: clamp(54px, 6vw, 96px);   --d: 34;  --t: 24s; --delay: .6s;  top: 9%; right: 7%; fill: var(--rosa); animation-direction: normal, reverse; }
.f5 { --s: clamp(80px, 10vw, 150px); --d: 16;  --t: 38s; --delay: .5s;  bottom: 13%; left: -3%; }

/* ---------- encabezado ---------- */

.top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(14px, 2.4vw, 28px) clamp(18px, 4vw, 56px) 0;
}
.top__logo {
  width: clamp(64px, 7vw, 96px);
  height: auto;
  animation: pop .7s var(--rebote) .1s both, sway 5s ease-in-out .8s infinite;
}
.top__tag {
  margin: 0;
  font-size: clamp(.7rem, 1vw, .95rem);
  letter-spacing: .14em;
  color: inherit;
  text-decoration: none;
  padding: .7em 0;
  border-bottom: 2.5px solid transparent;
  transition: color .2s, border-color .2s;
  animation: rise .7s ease-out .3s both;
}
.top__tag:hover, .top__tag:focus-visible { color: var(--rosa); border-color: currentColor; }
.top__tag:focus-visible { outline: 2.5px solid var(--crema); outline-offset: 6px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(8px, 2vw, 40px);
  padding: clamp(8px, 1.4vw, 20px) clamp(18px, 4vw, 56px) clamp(16px, 2vw, 28px);
}

.pill {
  display: inline-block;
  margin: 0 0 clamp(10px, 1.6vw, 22px);
  padding: .5em 1.2em .45em;
  border: 2.5px solid currentColor;
  border-radius: 999px;
  font-size: clamp(.68rem, .95vw, .9rem);
  letter-spacing: .16em;
  text-transform: uppercase;
  animation: rise .7s ease-out .35s both;
}

.title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-stretch: normal;
  font-size: clamp(4.2rem, min(12.2vw, 16svh), 17rem);
  line-height: .86;
  letter-spacing: -.01em;
  color: var(--rosa);
  text-shadow: .035em .04em 0 var(--marino);
}
.title__line { display: block; white-space: nowrap; }
.l {
  display: inline-block;
  animation: drop .9s var(--rebote) both;
  transition: translate .25s var(--rebote), rotate .25s var(--rebote), color .2s;
  cursor: default;
}
.l:hover { translate: 0 -9%; rotate: -6deg; color: var(--crema); }
.l:nth-child(even):hover { rotate: 6deg; }
.l--dash { margin-left: .04em; }

.title__line:nth-child(1) .l:nth-child(1) { animation-delay: .30s; }
.title__line:nth-child(1) .l:nth-child(2) { animation-delay: .35s; }
.title__line:nth-child(1) .l:nth-child(3) { animation-delay: .40s; }
.title__line:nth-child(1) .l:nth-child(4) { animation-delay: .45s; }
.title__line:nth-child(1) .l:nth-child(5) { animation-delay: .50s; }
.title__line:nth-child(2) .l:nth-child(1) { animation-delay: .55s; }
.title__line:nth-child(2) .l:nth-child(2) { animation-delay: .60s; }
.title__line:nth-child(2) .l:nth-child(3) { animation-delay: .65s; }
.title__line:nth-child(2) .l:nth-child(4) { animation-delay: .70s; }
.title__line:nth-child(2) .l:nth-child(5) { animation-delay: .75s; }
.title__line:nth-child(3) .l:nth-child(1) { animation-delay: .80s; }
.title__line:nth-child(3) .l:nth-child(2) { animation-delay: .85s; }
.title__line:nth-child(3) .l:nth-child(3) { animation-delay: .90s; }
.title__line:nth-child(3) .l:nth-child(4) { animation-delay: .95s; }
.title__line:nth-child(3) .l:nth-child(5) { animation-delay: 1.0s; }

.lede {
  margin: clamp(14px, 2vw, 28px) 0 0;
  font-size: clamp(.82rem, 1.25vw, 1.2rem);
  line-height: 1.35;
  letter-spacing: .06em;
  text-transform: uppercase;
  max-width: 30em;
  text-wrap: balance;
  animation: rise .8s ease-out 1.15s both;
}

.servicios {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: clamp(12px, 1.5vw, 20px);
  animation: rise .8s ease-out 1.3s both;
}
.servicios__para {
  flex: 0 0 100%;
  margin: 0;
  font-size: clamp(.6rem, .78vw, .74rem);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.servicio {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding: .7em 1.15em .65em;
  border-radius: 999px;
  background: var(--crema);
  color: var(--tinta);
  text-decoration: none;
  font-size: clamp(.66rem, .9vw, .86rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: translate .25s var(--rebote), background .2s, color .2s;
}
.servicio i { font-style: normal; transition: translate .25s var(--rebote); }
.servicio:hover, .servicio:focus-visible { translate: 0 -3px; background: var(--rosa); color: var(--crema); }
.servicio:hover i { translate: 4px 0; }
.servicio:focus-visible { outline: 2.5px solid var(--crema); outline-offset: 5px; }

/* ---------- escenario: sello, anillo de texto y mascota ---------- */

.stage {
  position: relative;
  justify-self: center;
  width: min(100%, max(320px, 100svh - 262px - 2.2vw), 860px);
  aspect-ratio: 1;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  translate: calc(var(--mx) * -10px) calc(var(--my) * -10px);
}
.stage > svg { position: absolute; overflow: visible; }

.stage__ring {
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--crema);
  font-family: var(--display);
  font-size: 21px;
  animation: pop 1s var(--rebote) .5s both, spin 36s linear infinite;
}
.stage__zigzag {
  inset: 9.5%;
  width: 81%;
  height: 81%;
  fill: none;
  stroke: var(--marino);
  stroke-width: 2;
  stroke-linejoin: round;
  animation: pop 1s var(--rebote) .4s both, spin 80s linear infinite reverse;
}
.stage__burst {
  inset: 13.5%;
  width: 73%;
  height: 73%;
  fill: var(--rosa);
  animation: pop 1s var(--rebote) .3s both, spin 60s linear infinite;
}

.stage__mascot {
  position: absolute;
  left: 9%;
  top: 17%;
  width: 82%;
  translate: calc(var(--mx) * 16px) calc(var(--my) * 16px);
}
.stage__mascot img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 .9vw 0 rgb(13 10 74 / .28));
  animation: pop .9s var(--rebote) .7s both, bob 3.2s ease-in-out 1.6s infinite;
}
.stage__mascot.is-jumping { animation: jump .7s var(--rebote); }

.seal {
  position: absolute;
  right: -1%;
  bottom: 3%;
  width: 27%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--marino);
  translate: calc(var(--mx) * 26px) calc(var(--my) * 26px);
  animation: pop .8s var(--rebote) 1.1s both, wobble 4s ease-in-out 2s infinite;
}
.seal svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--crema);
  animation: spin 22s linear infinite;
}
.seal span {
  position: relative;
  font-size: clamp(.62rem, 1.25vw, 1.3rem);
  line-height: 1.05;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
  font-weight: 900;
}

/* ---------- cinta inferior ---------- */

.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: var(--rosa);
  color: var(--tinta);
  border-top: 4px solid var(--marino);
  padding: clamp(10px, 1.3vw, 18px) 0 clamp(8px, 1.1vw, 15px);
  animation: fade .8s ease-out .9s both;
}
.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: clamp(18px, 2.4vw, 40px);
  padding-left: clamp(18px, 2.4vw, 40px);
  font-size: clamp(.95rem, 1.9vw, 1.7rem);
  letter-spacing: .05em;
  text-transform: uppercase;
  font-weight: 900;
  white-space: nowrap;
  animation: marquee 44s linear infinite;
}
.marquee__track svg {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  fill: var(--azul);
  animation: spin 6s linear infinite;
}

/* ---------- cursor ---------- */

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 20;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  will-change: transform;
}
.cursor.is-visible { opacity: 1; }
.cursor svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transition: scale .25s var(--rebote);
  animation: spin 7s linear infinite;
}
.cursor__edge { fill: var(--tinta); }
.cursor__fill { fill: var(--crema); transition: fill .2s; }
.cursor__dot  { fill: var(--rosa); transition: fill .2s; }
.cursor.is-hover svg { scale: 1.75; animation-duration: 1.6s; }
.cursor.is-hover .cursor__fill { fill: var(--rosa); }
.cursor.is-hover .cursor__dot  { fill: var(--crema); }
.cursor.is-down svg { scale: .8; }
.cursor.is-hover.is-down svg { scale: 1.35; }

html.has-cursor, html.has-cursor * { cursor: none !important; }

/* ---------- animaciones ---------- */

@keyframes pop    { from { scale: 0; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes spin   { to { rotate: 360deg; } }
@keyframes fade   { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes drop   { from { opacity: 0; transform: translateY(-70%) rotate(-14deg); } to { opacity: 1; transform: none; } }
@keyframes bob    { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-4.5%) rotate(2.5deg); } }
@keyframes sway   { 0%, 100% { rotate: -5deg; } 50% { rotate: 5deg; } }
@keyframes wobble { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(7deg) scale(1.05); } }
@keyframes jump   { 0% { transform: none; } 35% { transform: translateY(-11%) scale(1.06, .95) rotate(-5deg); } 70% { transform: translateY(1.5%) scale(.97, 1.04); } 100% { transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- móvil ---------- */

@media (max-width: 820px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 6px;
  }
  .title { font-size: clamp(3.4rem, 21.5vw, 9rem); }
  .stage { width: min(93%, 520px, max(250px, 100svh - 556px)); margin-top: 4px; }
  .seal { right: 0; }
  .f2 { top: 39%; left: auto; right: -6%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .flower, .stage, .stage__mascot, .seal { translate: none; }
}
