/**
 * assets/css/landing.css
 *
 * Estilos de la landing de Combo Resuelto (index.php): paleta de marca muy viva, héroe animado,
 * tarjetas de combos, cinta deslizante, carrito lateral y animaciones de aparición.
 * Las animaciones se desactivan con prefers-reduced-motion. Lo carga index.php.
 */

/* ---------- Paleta y medidas de marca (ver brand/index.html) ---------- */
:root {
    --naranja: #FF5A1F;   /* color principal: energía y apetito */
    --mango:   #FF8A00;   /* naranja claro del degradado */
    --rosa:    #FF2E7E;   /* acento fuerte: "Resuelto" */
    --sol:     #FFC400;   /* amarillo: ahorro, botones estrella */
    --verde:   #12C26B;   /* confirmaciones */
    --noche:   #1B1464;   /* texto y fondos oscuros */
    --crema:   #FFF7EC;   /* fondo base cálido */
    --radio:   22px;      /* redondeo general */
    --sombra:  0 12px 30px rgba(27, 20, 100, .16); /* sombra suave de tarjetas */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }               /* medidas predecibles */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }      /* scroll suave bajo la cabecera fija */
body { margin: 0; font-family: 'Nunito', system-ui, sans-serif; color: var(--noche); background: var(--crema); overflow-x: hidden; }
h1, h2, h3, .btn, .precio strong { font-family: 'Fredoka', 'Nunito', sans-serif; } /* títulos redondos */
img { max-width: 100%; }
a { color: inherit; }

/* ---------- Botones ---------- */
.btn { border: 0; cursor: pointer; text-decoration: none; display: inline-block; background: linear-gradient(135deg, var(--mango), var(--rosa)); color: #fff; font-weight: 600; font-size: 1rem; padding: .7rem 1.4rem; border-radius: 999px; box-shadow: 0 8px 20px rgba(255, 46, 126, .35); transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 14px 28px rgba(255, 46, 126, .45); }
.btn:active { transform: scale(.97); }
.btn--grande { font-size: 1.15rem; padding: .9rem 1.8rem; }
.btn--mini { padding: .45rem 1rem; font-size: .95rem; }
.btn--borde { background: #fff; color: var(--noche); box-shadow: inset 0 0 0 3px var(--noche); }
.btn--sol { background: var(--sol); color: var(--noche); box-shadow: 0 8px 20px rgba(255, 196, 0, .5); animation: latido 2s ease-in-out infinite; }
.btn--blanco { background: #fff; color: var(--rosa); box-shadow: none; }
:focus-visible { outline: 3px solid var(--noche); outline-offset: 3px; } /* foco visible para teclado */

/* ---------- Cabecera fija ---------- */
.top { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 1.5rem; padding: .6rem 1.5rem; background: rgba(255, 247, 236, .85); backdrop-filter: blur(12px); box-shadow: 0 2px 16px rgba(27, 20, 100, .08); }
.top__logo img { display: block; height: 44px; width: auto; }
.top__nav { margin-left: auto; display: flex; gap: 1.2rem; font-weight: 800; }
.top__nav a { text-decoration: none; position: relative; }
.top__nav a::after { content: ''; position: absolute; left: 0; bottom: -4px; height: 3px; width: 0; background: var(--rosa); border-radius: 3px; transition: width .25s; } /* subrayado animado */
.top__nav a:hover::after { width: 100%; }
.top__carrito { position: relative; border: 0; cursor: pointer; font-size: 1.4rem; background: var(--sol); border-radius: 999px; padding: .4rem .9rem; }
.top__nav + .top__carrito { margin-left: 0; }
.cuenta { font: 700 .8rem 'Fredoka'; background: var(--rosa); color: #fff; border-radius: 999px; padding: .1rem .5rem; vertical-align: middle; }
.cuenta.salta { animation: salto .4s; } /* rebote al agregar */

/* ---------- Héroe ---------- */
.hero { position: relative; min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 2rem; padding: 7rem 6vw 4rem; background: linear-gradient(160deg, #FFB200 0%, var(--naranja) 45%, var(--rosa) 100%); color: #fff; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: deriva 14s ease-in-out infinite alternate; } /* manchas de luz */
.blob--1 { width: 420px; height: 420px; background: var(--sol); top: -120px; left: -100px; }
.blob--2 { width: 360px; height: 360px; background: #7B2CFF; bottom: -120px; right: 10%; animation-delay: -4s; }
.blob--3 { width: 280px; height: 280px; background: var(--verde); top: 30%; right: -80px; animation-delay: -8s; }
.flota { position: absolute; inset: 0; pointer-events: none; z-index: 1; } /* capa decorativa: fuera de la rejilla, para no ocupar una columna */
.flota span { position: absolute; left: var(--x); top: var(--y); font-size: 2.6rem; animation: flotar 6s ease-in-out infinite; animation-delay: var(--d); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .25)); }
.hero__texto, .estrella { position: relative; z-index: 2; }
.hero { align-items: start; min-height: auto; }                 /* el texto arranca arriba, alineado con la tarjeta (sin hueco superior) */
.hero__texto { padding-top: 1.5rem; }
.estrella { margin-top: .5rem; }
/* Fila de cifras del día bajo el héroe */
.datos { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.datos > div { background: rgba(255, 255, 255, .2); border: 2px solid rgba(255, 255, 255, .45); border-radius: 18px; padding: .7rem 1.1rem; backdrop-filter: blur(6px); }
.datos strong { display: block; font: 700 1.9rem 'Fredoka'; color: var(--sol); line-height: 1; }
.datos span { font-weight: 800; font-size: .85rem; }
.pildora { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255, 255, 255, .22); border: 2px solid rgba(255, 255, 255, .5); padding: .35rem 1rem; border-radius: 999px; font-weight: 800; backdrop-filter: blur(6px); }
.punto { width: 10px; height: 10px; border-radius: 50%; background: var(--sol); animation: pulso 1.4s infinite; }
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 5.2rem); line-height: 1.02; margin: 1rem 0; text-shadow: 0 6px 0 rgba(27, 20, 100, .25); animation: entra .9s both; }
.resuelta { color: var(--sol); position: relative; display: inline-block; }
.resuelta--sol { color: var(--noche); }
.check { display: inline-grid; place-items: center; width: .8em; height: .8em; margin-left: .15em; background: var(--verde); border-radius: 50%; font-size: .6em; vertical-align: .15em; animation: pop .7s .8s both cubic-bezier(.3, 1.8, .5, 1); } /* check que "salta" al cargar */
.hero__slogan { font-size: 1.35rem; font-weight: 800; min-height: 2.8em; transition: opacity .4s, transform .4s; }
.hero__slogan.sale { opacity: 0; transform: translateY(12px); }
.hero__acciones { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.confianza { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; list-style: none; padding: 0; margin: 1.2rem 0 0; font-weight: 800; }

/* Tarjeta estrella del héroe */
.estrella { background: #fff; color: var(--noche); border-radius: 32px; padding: 2.2rem 2rem 1.6rem; box-shadow: 0 30px 60px rgba(27, 20, 100, .35); transform: rotate(2deg); animation: entra-der 1s .2s both, mece 6s 1.2s ease-in-out infinite; max-width: 440px; justify-self: center; }
.estrella__cinta { position: absolute; top: -18px; left: 24px; background: var(--noche); color: var(--sol); font: 600 1rem 'Fredoka'; padding: .45rem 1.1rem; border-radius: 999px; box-shadow: 0 6px 14px rgba(0, 0, 0, .3); }
.estrella__emoji { font-size: 5rem; text-align: center; animation: flotar 3s ease-in-out infinite; }
.estrella h2 { margin: .2rem 0; font-size: 2rem; }
.estrella__precio { display: flex; align-items: baseline; gap: .7rem; margin: .8rem 0; }
.estrella__precio strong { font: 700 2.8rem 'Fredoka'; color: var(--rosa); }
.estrella__precio s { opacity: .55; font-size: 1.2rem; }
.cuenta-atras { background: var(--noche); color: #fff; padding: .5rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 800; text-align: center; }
.cuenta-atras b { color: var(--sol); font: 700 1.3rem 'Fredoka'; letter-spacing: .05em; font-variant-numeric: tabular-nums; }
.estrella .btn { width: 100%; }

/* ---------- Cinta deslizante ---------- */
.cinta { background: var(--noche); color: var(--sol); overflow: hidden; white-space: nowrap; padding: .9rem 0; transform: rotate(-1deg) scale(1.02); margin: -1rem 0 1rem; position: relative; z-index: 3; }
.cinta__pista { display: inline-block; animation: cinta 28s linear infinite; }
.cinta span { font: 600 1.2rem 'Fredoka'; margin: 0 2rem; }

/* ---------- Secciones ---------- */
.seccion { padding: 5rem 6vw; }
.seccion--color { background: linear-gradient(135deg, var(--verde), #00A8A8); color: #fff; }
.titulo { font-size: clamp(2rem, 4.5vw, 3.4rem); margin: 0 0 .5rem; text-align: center; }
.titulo--blanco { color: #fff; text-align: left; }
.subtitulo { text-align: center; max-width: 640px; margin: 0 auto 2rem; font-size: 1.15rem; font-weight: 600; }
.subtitulo--blanco { text-align: left; margin-left: 0; }

/* Filtros */
.filtros { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 2rem; }
.filtro { border: 3px solid var(--noche); background: #fff; color: var(--noche); font: 600 1rem 'Fredoka'; padding: .45rem 1.1rem; border-radius: 999px; cursor: pointer; transition: all .2s; }
.filtro:hover { transform: translateY(-2px); }
.filtro.activo { background: var(--noche); color: var(--sol); }

/* Tarjetas de combo */
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.6rem; }
.combo { position: relative; background: #fff; border-radius: var(--radio); padding: 1.6rem 1.4rem 1.3rem; box-shadow: var(--sombra); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; border: 3px solid transparent; }
.combo:hover, .combo:focus-visible { transform: translateY(-8px) rotate(-1deg); border-color: var(--sol); box-shadow: 0 24px 40px rgba(255, 90, 31, .25); }
.combo.oculto { display: none; }
.combo__emoji { font-size: 3.6rem; transition: transform .3s; }
.combo:hover .combo__emoji { transform: scale(1.25) rotate(-8deg); }
.combo h3 { margin: .3rem 0; font-size: 1.5rem; }
.combo__desc { margin: 0 0 .6rem; font-weight: 600; opacity: .8; }
.combo__items { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.combo__items li { background: #FFF0DB; border-radius: 999px; padding: .2rem .7rem; font-size: .85rem; }
.combo__items--claro li { background: #FFF0DB; }
.combo__pie { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.precio strong { font-size: 1.9rem; color: var(--rosa); }
.precio s { margin-left: .4rem; opacity: .5; }
.combo__ahorro { position: absolute; top: -12px; right: 14px; background: var(--sol); color: var(--noche); font: 700 1rem 'Fredoka'; padding: .3rem .8rem; border-radius: 999px; transform: rotate(6deg); box-shadow: 0 6px 12px rgba(255, 196, 0, .5); }
.combo__ahorro--fijo { position: static; }

/* Extras */
.extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; max-width: 1000px; margin: 0 auto; }
.extra { display: flex; align-items: center; gap: .9rem; background: rgba(255, 255, 255, .18); border: 2px solid rgba(255, 255, 255, .5); border-radius: var(--radio); padding: 1rem; backdrop-filter: blur(4px); }
.extra > div { flex: 1; }
.extra__emoji { font-size: 2.4rem; }
.extra__precio { font-weight: 800; color: var(--sol); }

/* Pasos */
.pasos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.6rem; max-width: 1000px; margin: 2rem auto 0; }
.paso { background: #fff; border-radius: var(--radio); padding: 2rem 1.5rem; text-align: center; box-shadow: var(--sombra); }
.paso__n { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--mango), var(--rosa)); color: #fff; font: 700 1.7rem 'Fredoka'; margin-bottom: .6rem; }
.paso h3 { margin: .3rem 0; }

/* Delivery */
.delivery { display: flex; align-items: center; gap: 2rem; padding: 4rem 6vw; background: var(--noche); color: #fff; overflow: hidden; }
.delivery__moto { font-size: 7rem; animation: moto 5s ease-in-out infinite; }

/* Preguntas */
.faq { max-width: 760px; margin: 2rem auto 0; display: grid; gap: .8rem; }
.faq details { background: #fff; border-radius: 16px; padding: 1rem 1.3rem; box-shadow: var(--sombra); }
.faq summary { cursor: pointer; font: 600 1.15rem 'Fredoka'; }
.faq p { margin: .6rem 0 0; font-weight: 600; }

/* Pie */
.pie { text-align: center; padding: 2.5rem 1rem; background: #0F0A3D; color: #fff; }

/* ---------- Carrito lateral ---------- */
.velo { position: fixed; inset: 0; background: rgba(27, 20, 100, .55); z-index: 90; backdrop-filter: blur(3px); }
.carrito { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; z-index: 100; transform: translateX(105%); transition: transform .35s cubic-bezier(.2, .9, .3, 1); display: flex; flex-direction: column; box-shadow: -20px 0 40px rgba(0, 0, 0, .25); }
.carrito.abierto { transform: none; }
.carrito__cab { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 1.4rem; background: linear-gradient(135deg, var(--mango), var(--rosa)); color: #fff; }
.carrito__cab h2 { margin: 0; }
.carrito__cab button { border: 0; background: rgba(255, 255, 255, .3); color: #fff; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; }
.carrito__lista { list-style: none; margin: 0; padding: 1rem 1.4rem; overflow: auto; flex: 1; }
.carrito__vacio { padding: 0 1.4rem; font-weight: 700; text-align: center; }
.linea { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 2px dashed #eee; animation: entra .3s both; }
.linea__emoji { font-size: 2rem; }
.linea__precio { font-weight: 800; color: var(--rosa); }
.cant { display: inline-flex; align-items: center; gap: .5rem; margin-top: .2rem; }
.cant button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--noche); background: #fff; cursor: pointer; font-weight: 800; }
.carrito__pie { padding: 1.2rem 1.4rem; border-top: 3px solid var(--sol); }
.carrito__total { display: flex; justify-content: space-between; font: 600 1.4rem 'Fredoka'; margin-bottom: .8rem; }
.carrito__pie .btn { width: 100%; }

/* ---------- Confeti y aviso ---------- */
#confeti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 200; }
.aviso { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--noche); color: #fff; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 800; z-index: 150; transition: transform .35s; box-shadow: var(--sombra); max-width: 90vw; text-align: center; }
.aviso.visible { transform: translate(-50%, 0); }

/* ---------- Aparición al hacer scroll (solo si hay JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(40px) scale(.97); transition: opacity .7s, transform .7s cubic-bezier(.2, .9, .3, 1); }
.js .reveal.visto { opacity: 1; transform: none; }

/* ---------- Animaciones ---------- */
@keyframes flotar { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-18px) rotate(6deg); } }
@keyframes deriva { to { transform: translate(60px, 40px) scale(1.15); } }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(255, 196, 0, .8); } 100% { box-shadow: 0 0 0 14px rgba(255, 196, 0, 0); } }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes entra { from { opacity: 0; transform: translateY(30px); } }
@keyframes entra-der { from { opacity: 0; transform: translateX(80px) rotate(8deg); } }
@keyframes pop { from { transform: scale(0) rotate(-90deg); } }
@keyframes mece { 0%, 100% { transform: rotate(2deg); } 50% { transform: rotate(-1deg) translateY(-6px); } }
@keyframes cinta { to { transform: translateX(-50%); } }
@keyframes moto { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(40px); } }
@keyframes salto { 40% { transform: scale(1.6) rotate(10deg); } }

/* ---------- Móvil ---------- */
@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; padding-top: 6rem; }
    .top__nav { display: none; }
    .top__carrito { margin-left: auto; }
    .delivery { flex-direction: column; text-align: center; }
    .titulo--blanco, .subtitulo--blanco { text-align: center; }
}

/* ---------- Accesibilidad: sin animaciones si el usuario lo pide ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* Aviso de "sitio en pruebas": visible mientras existan datos de ejemplo (lo apaga el borrado de ejemplos) */
.aviso-ejemplo { position: fixed; left: 12px; bottom: 12px; z-index: 120; background: var(--noche); color: var(--sol); font: 600 .85rem 'Fredoka', sans-serif; padding: .4rem .9rem; border-radius: 999px; box-shadow: var(--sombra); opacity: .92; pointer-events: none; }
