/* ==========================================================
   Fuego Dulce · Memorama (widget fd-memorama)
   ========================================================== */
@font-face {
	font-family: 'FD Cookies';
	src: url('fonts/Cookies.ttf') format('truetype');
	font-display: swap;
}

.fdmm {
	--mm-wine: #4a0a24; --mm-ink: #26101b; --mm-yellow: #ffd84a; --mm-pink: #ffe3ec; --mm-brand: #c60342;
	--mm-spring: cubic-bezier(0.34, 1.56, 0.64, 1); --mm-ease: cubic-bezier(0.22, 1, 0.36, 1);
	position: relative; box-sizing: border-box; display: grid; justify-items: center; text-align: center;
	padding: clamp(60px, 8vw, 110px) max(20px, calc((100% - 1100px) / 2)); background: var(--mm-wine); color: #fff;
	font-family: 'DM Sans', system-ui, sans-serif; overflow: hidden; isolation: isolate;
}
.fdmm *, .fdmm *::before, .fdmm *::after { box-sizing: border-box; }
.fdmm img { max-width: none; }
.fdmm-fun { font-family: 'FD Cookies', 'Bricolage Grotesque', sans-serif !important; font-weight: 400 !important; letter-spacing: 0.01em; }
.fdmm .fdb-acc { position: relative; display: inline-block; }
.fdmm .fdb-acc::after { content: ''; position: absolute; left: 50%; top: -0.08em; width: 0.16em; height: 0.3em; border-radius: 0.1em; background: currentColor; transform: translateX(-30%) rotate(28deg); }
.fdmm .fdb-acc--i::after { top: -0.2em; height: 0.26em; }
.fdmm .fdb-acc--n::after { content: '~'; width: auto; height: auto; top: -0.42em; background: none; transform: translateX(-50%) scaleX(1.3); font: 700 0.75em/1 'DM Sans', sans-serif; }

.fdmm-g { position: absolute; z-index: -1; width: clamp(70px, 8vw, 120px); height: auto; filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.35)); animation: fdmm-fl 6s ease-in-out infinite; pointer-events: none; }
.fdmm-g--0 { left: 3%; top: 12%; }
.fdmm-g--1 { right: 3%; bottom: 10%; animation-delay: -3s; }
@keyframes fdmm-fl { 50% { transform: translateY(-14px) rotate(8deg); } }

.fdmm-sticker { display: inline-block; padding: 10px 18px 8px; border-radius: 999px; background: var(--mm-yellow); color: var(--mm-ink); font-size: 1.2rem; line-height: 1; transform: rotate(-4deg); }
.fdmm .fdmm-h2 { margin: 14px 0 0; padding: 0; color: #fff; font: 400 clamp(2.8rem, 1.6rem + 5vw, 6.2rem)/0.98 'Anton', sans-serif; text-transform: uppercase; text-shadow: 0 7px 0 rgba(0, 0, 0, 0.3); }
.fdmm-h2 span { display: block; }
.fdmm-h2 .y { color: var(--mm-yellow); }
.fdmm-p { margin: 14px 0 0; color: rgba(255, 255, 255, 0.86); font-size: 18px; line-height: 1.5; }

.fdmm__bar { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.fdmm__bar span { padding: 9px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-weight: 800; font-variant-numeric: tabular-nums; }
.fdmm__bar b { color: var(--mm-yellow); }

.fdmm__board { position: relative; width: 100%; max-width: 860px; margin-top: 24px; }
.fdmm__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 16px); -webkit-perspective: 1000px; perspective: 1000px; }
.fdmm .fdmm-card { position: relative; aspect-ratio: 1; margin: 0; padding: 0; border: 0; border-radius: 18px; background: none; box-shadow: none; cursor: pointer; }
.fdmm-card__in { position: absolute; inset: 0; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; transition: transform 0.5s var(--mm-spring); }
.fdmm-card.is-up .fdmm-card__in, .fdmm-card.is-ok .fdmm-card__in { transform: rotateY(180deg); }
.fdmm-card__f { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; border-radius: 18px; -webkit-backface-visibility: hidden; backface-visibility: hidden; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3); }
.fdmm-card__back { background: var(--mm-brand); background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1.5px, transparent 1.6px); background-size: 14px 14px; }
.fdmm-card__back img { width: 58%; height: auto; }
.fdmm-card__front { -webkit-transform: rotateY(180deg); transform: rotateY(180deg); background: var(--mm-pink); }
.fdmm-card__front img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-transform: translateZ(1px); transform: translateZ(1px); }
.fdmm-card.is-ok .fdmm-card__front { box-shadow: 0 0 0 4px var(--mm-yellow), 0 6px 0 rgba(0, 0, 0, 0.3); }
.fdmm .fdmm-card:hover:not(.is-up):not(.is-ok) .fdmm-card__in { transform: translateY(-4px) rotate(-2deg); }
.fdmm .fdmm-card:focus-visible { outline: 3px solid var(--mm-yellow); outline-offset: 3px; }

.fdmm__win { position: absolute; inset: -10px; z-index: 5; display: grid; place-items: center; align-content: center; gap: 10px; padding: 24px; border-radius: 24px; background: rgba(74, 10, 36, 0.95); animation: fdmm-in 0.4s var(--mm-ease); }
.fdmm__win[hidden] { display: none; }
@keyframes fdmm-in { from { opacity: 0; transform: scale(0.95); } }
.fdmm__title { margin: 0; color: var(--mm-yellow); font: 400 clamp(2.2rem, 1.6rem + 2.6vw, 4rem)/1 'Anton', sans-serif; text-transform: uppercase; }
.fdmm__btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.fdmm .fdmm-btn { min-height: 54px; margin: 0; padding: 0 26px; border: 0; border-radius: 999px; font: 800 16px/1 'DM Sans', sans-serif; text-transform: none; letter-spacing: 0; cursor: pointer; transition: transform 0.25s var(--mm-spring); }
.fdmm .fdmm-btn--y { background: var(--mm-yellow); color: var(--mm-ink); box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3); }
.fdmm .fdmm-btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
.fdmm .fdmm-btn:hover { transform: translateY(-3px); }
.fdmm .fdmm-btn--y:hover { background: var(--mm-yellow); color: var(--mm-ink); }
.fdmm .fdmm-btn--ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

@media (max-width: 700px) {
	.fdmm__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.fdmm-g { width: 56px; }
}
@media (prefers-reduced-motion: reduce) {
	.fdmm *, .fdmm *::before { animation: none !important; transition-duration: 0.01ms !important; }
}
